Skip to content

Commit

Permalink
docs: rename wasm32-wai to wasm32-wasip1 (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
wujunzhuo authored Dec 28, 2024
1 parent 11f2e9c commit 1dd203a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
9 changes: 4 additions & 5 deletions docs/pages/docs/wasm-c.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ void yomo_handler() {
### Compile to [WASI](https://wasi.dev/)

```bash
# download wasi-sdk from https://github.com/WebAssembly/wasi-sdk/releases,
# and specify wasi-sdk version and path
# download wasi-sdk from https://github.com/WebAssembly/wasi-sdk/releases
$ export WASI_VERSION_FULL=20.0
$ export WASI_SDK_PATH=~/Downloads/wasi-sdk-$WASI_VERSION_FULL
# specify the wasi-sdk directory path according to your system
$ export WASI_SDK_PATH=~/Downloads/wasi-sdk-25.0-arm64-macos
$ $WASI_SDK_PATH/bin/clang --target=wasm32-wasi \
$ $WASI_SDK_PATH/bin/clang --target=wasm32-wasip1 \
--sysroot=$WASI_SDK_PATH/share/wasi-sysroot \
-nostartfiles -fvisibility=hidden -O3 \
-Wl,--no-entry,--export=yomo_init,--export=yomo_handler,--export=yomo_observe_datatags \
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/wasm-rust.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ yomo = "0.3"
Compile to wasm:

```bash
$ rustup target add wasm32-wasi
$ cargo build --release --target wasm32-wasi
$ rustup target add wasm32-wasip1
$ cargo build --release --target wasm32-wasip1
```

### Run Streaming Serverless Function
Expand Down
7 changes: 3 additions & 4 deletions example/7-wasm/sfn/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ download from https://github.com/WebAssembly/wasi-sdk/releases
## Build

```sh
# specify the wasi-sdk version and the directory path according to your system
export WASI_VERSION_FULL=20.0
export WASI_SDK_PATH=~/Downloads/wasi-sdk-$WASI_VERSION_FULL
# specify the wasi-sdk directory path according to your system
export WASI_SDK_PATH=~/Downloads/wasi-sdk-25.0-arm64-macos

$WASI_SDK_PATH/bin/clang --target=wasm32-wasi \
$WASI_SDK_PATH/bin/clang --target=wasm32-wasip1 \
--sysroot=$WASI_SDK_PATH/share/wasi-sysroot \
-nostartfiles -fvisibility=hidden -O3 \
-Wl,--no-entry,--export=yomo_init,--export=yomo_handler,--export=yomo_observe_datatags \
Expand Down
6 changes: 3 additions & 3 deletions example/7-wasm/sfn/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ hence it will be convenient for developers by importing this crate to your app
istead of implementing our wasm api spec. See [src/lib.rs](src/lib.rs) for more
details.

## Add wasm32-wasi target
## Add wasm32-wasip1 target

```sh
rustup target add wasm32-wasi
rustup target add wasm32-wasip1
```

## Build

```sh
cargo build --release --target wasm32-wasi
cargo build --release --target wasm32-wasip1

cp target/wasm32-wasi/release/sfn.wasm ..
```

0 comments on commit 1dd203a

Please sign in to comment.