Skip to content

Commit b9dd197

Browse files
Use "wasm32-wasip1" instead of "wasm32-wasm" for UDF (#76)
Signed-off-by: TennyZhuang <[email protected]> Co-authored-by: IrisWan <[email protected]>
1 parent 14094ca commit b9dd197

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sql/udfs/use-udfs-in-rust.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ If you want to use other libraries in your Rust functions, you can manually buil
7979
### Prerequisites
8080

8181
* Ensure that you have [Rust toolchain](https://rustup.rs) (stable channel) installed on your computer.
82-
* Ensure that the Rust standard library for `wasm32-wasi` target is installed:
82+
* Ensure that the Rust standard library for `wasm32-wasip1` target is installed:
8383
```sql
84-
rustup target add wasm32-wasi
84+
rustup target add wasm32-wasip1
8585
```
8686

8787
### 1\. Create a project
@@ -134,10 +134,10 @@ See the correspondence between SQL types and Rust types in the [Data type mappin
134134
Build your functions into a WebAssembly module:
135135
136136
```bash
137-
cargo build --release --target wasm32-wasi
137+
cargo build --release --target wasm32-wasip1
138138
```
139139
140-
You can find the generated WASM module at `target/wasm32-wasi/release/udf.wasm`.
140+
You can find the generated WASM module at `target/wasm32-wasip1/release/udf.wasm`.
141141
142142
Optional: It is recommended to strip the binary to reduce its size:
143143
@@ -146,7 +146,7 @@ Optional: It is recommended to strip the binary to reduce its size:
146146
cargo install wasm-tools
147147

148148
# Strip the binary
149-
wasm-tools strip ./target/wasm32-wasi/release/udf.wasm > udf.wasm
149+
wasm-tools strip ./target/wasm32-wasip1/release/udf.wasm > udf.wasm
150150
```
151151
152152
## 4\. Declare your functions in RisingWave

0 commit comments

Comments
 (0)