Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: rename wasm32-wai to wasm32-wasip1 #982

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ..
```
Loading