Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
/ axum-wasm-test Public archive

Testing Axum & Tokio with WebAssembly

License

Notifications You must be signed in to change notification settings

rjzak/axum-wasm-test

Repository files navigation

Test code for Axum, Tokio, WASI

Compiling:

  1. Build with Tokio unstable flag:
    • RUSTFLAGS="--cfg tokio_unstable" cargo build

Run with Enarx:

  1. Get Enarx
  2. Run: CARGO_TARGET_WASM32_WASI_RUNNER="enarx run --wasmcfgfile Enarx.toml" cargo run --target=wasm32-wasi

Run with Wasmtime:

  1. Get Wasmtime
  2. Run: CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime run --tcplisten 127.0.0.1:8080 --env FD_COUNT=3" cargo run --target=wasm32-wasi