From 3f002031bfa05350c1de63df392a9797d18658e2 Mon Sep 17 00:00:00 2001 From: Paul Butler Date: Sat, 5 Oct 2024 10:01:01 -0700 Subject: [PATCH] wasmp1 support (#23) --- stateroom-cli/src/build_util.rs | 2 +- stateroom-wasm/README.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stateroom-cli/src/build_util.rs b/stateroom-cli/src/build_util.rs index b74e446..532d9c0 100644 --- a/stateroom-cli/src/build_util.rs +++ b/stateroom-cli/src/build_util.rs @@ -101,7 +101,7 @@ pub struct BuildResult { pub fn do_build(config: &StateroomConfig) -> Result { tracing::info!("Building service"); - let server_wasm = run_cargo_build_command(&config.service.package, "wasm32-wasi", true)?; + let server_wasm = run_cargo_build_command(&config.service.package, "wasm32-wasip1", true)?; let client_wasm = if let Some(client_config) = &config.client { tracing::info!("Building client"); diff --git a/stateroom-wasm/README.md b/stateroom-wasm/README.md index 4443987..46383f8 100644 --- a/stateroom-wasm/README.md +++ b/stateroom-wasm/README.md @@ -35,15 +35,15 @@ imported from the host environment (like `send_message`). ## Compiling If you are using the Stateroom command-line interface, `stateroom dev` will build the -current crate using the `wasm32-wasi` target, and then load and serve the generated +current crate using the `wasm32-wasip1` target, and then load and serve the generated WebAssembly module. -If you would like to build it manually, make sure you have the `wasm32-wasi` target installed +If you would like to build it manually, make sure you have the `wasm32-wasip1` target installed and pass it as a target to `cargo build`: ```bash -$ rustup target add wasm32-wasi -$ cargo build --release --target=wasm32-wasi +$ rustup target add wasm32-wasip1 +$ cargo build --release --target=wasm32-wasip1 ``` ## Embedding