This repo contains a starter project for building a Wasix based axum web server.
$ cargo wasix build
$ wasmer run target/wasm32-wasmer-wasi/release/wasix-axum.wasm --net --env PORT=8080
Listening on http://127.0.0.1:8080
Note: The
PORT
environment variable is required to run the server locally. On edge this defaults to 80 because Wasmer edge expects the server to listen on port 80 and it will proxy the request to the server.
- Login to
wasmer-cli
$ wasmer login
- Replace
wasix-org
username inwasmer.toml
anddeploy.toml
with your usernameNote:
wasmer.toml
is for publishing the image to wasmer registry anddeploy.toml
is for deploying the image to wasmer-edge - Deploy to
wasmer-edge
$ wasmer deploy
Checkout the full tutorial here
This project is available on wasmer edge:
Available on https://wasix-axum-example.wasmer.app