WebAssembly Language Runtimes (or WLR for short) offers pre-built wasm32-wasi binaries for language runtimes and static builds of common open source libraries.
This repository contains the build scripts and patches that are used to do those builds, as well as examples on how to use them.
WLR is used in projects like mod_wasm for traditional deployments and Wasm Workers Server for the development of serverless apps. To get a glimpse of that you could:
- [5 min] Run WordPress with php.wasm, mod_wasm and Apache. (You'll need Docker for a container with Apache).
- [10 min] Create and run a Ruby worker on wws.
The released assets are also easy to use with various platforms and tools.
- [5 min] Take a look at how to run the python-wasm Docker container. (You'll need the latest Docker Desktop with enabled containerd).
- [10 min] Follow the steps in Fermyon's blog post on PHP, Spin and Fermyon cloud.
If you are into porting of C-based apps to wasm32-wasi you could play with the libs.
- [10 min] Build a C-app that uses the libuuid and zlib static libraries.
- [1 day – 2 weeks] Port a static library. Take a look at the build scripts for
libs/zlib
as an example. Pick a library you want to see ported. Try building it to wasm32-wasi. (Prior knowledge of building C apps with autotools, make, cmake, pkg-config will be an advantage).
Here is a reference to the latest releases of all built projects.
Language runtime | Latest release |
---|---|
php | 8.2.6 |
python | 3.12.0 |
ruby | 3.2.2 |
Library | Latest release |
---|---|
libs/bundle_wlr | 0.1.0 |
libs/bzip2 | 1.0.8 |
libs/libjpeg | 2.1.5.1 |
libs/libpng | 1.6.39 |
libs/libuuid | 1.0.3 |
libs/libxml2 | 2.11.4 |
libs/oniguruma | 6.9.8 |
libs/sqlite | 3.42.0 |
libs/zlib | 1.2.13 |
If you want to contribute to this project or run a build on your own machine, take a look at the ./docs/developers.md documentation.