2019-09-05 05:56:51 +08:00
|
|
|
# WASI Tests
|
|
|
|
|
2023-10-05 00:35:39 +08:00
|
|
|
Compile with clang and `wasm32-wasi` target by using the wasi-sdk
|
|
|
|
[version 20](https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-20)
|
|
|
|
|
|
|
|
Install wasi-sdk and then set WASI\_SDK\_PATH to the root of the install.
|
|
|
|
|
|
|
|
You can then rebuild the wasm for the tests by running:
|
2021-09-20 04:28:29 +08:00
|
|
|
|
2023-05-20 06:14:03 +08:00
|
|
|
```bash
|
2023-10-05 00:35:39 +08:00
|
|
|
make CC=${WASI_SDK_PATH}/bin/clang SYSROOT=${WASI_SDK_PATH}/share/wasi-sysroot
|
2019-09-05 05:56:51 +08:00
|
|
|
```
|
2023-10-05 00:35:39 +08:00
|
|
|
|
|
|
|
If you update the version of the wasi-sdk to be used for the compile
|
|
|
|
remove all of the \*.wasm files in the wasm directory to ensure
|
|
|
|
you rebuild/test all of the tests with the new version.
|