WebAssembly¶
SWS can run in a WebAssembly context.
Wasm/Wasix targets are not officially supported by SWS yet
We do not officially support Wasm or Wasix targets yet. But SWS project will eventually support Wasix as a target in a not remote future.
In the meantime, Wasmer folks made it possible to run SWS via Wasix today via a series of patches.
Wasix¶
You can run SWS using The Wasmer Runtime with Wasix. See the wasmer/static-web-server package.
To run SWS, make sure to install Wasmer first and then enable its net
and threads
features as well as map your host directory via the mapdir
option before starting the server.
Here is an example.
wasmer run wasmer/static-web-server \
--net --enable-threads --mapdir /public:/my/host/dir -- --port 8787
See The WASIX with Axum Tutorial for more details.