wasm-micro-runtime/samples/wasi-threads/README.md
Enrico Loparco 83659fa42a
Use wasi-sdk 20 pre-release for tests with threads (#2021)
`wasi-sdk-20` pre-release can be used to avoid building `wasi-libc` to enable threads.
It's not possible to use `wasi-sdk-20` pre-release on Ubuntu 20.04 because of
incompatibility with the glibc version:
```bash
/opt/wasi-sdk/bin/clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found
(required by /opt/wasi-sdk/bin/clang)
```
2023-03-17 20:02:03 +08:00

25 lines
466 B
Markdown

# "WASI threads" sample introduction
To run the sample, `wasi-sdk` >= 20 is required.
## Build and run the samples
```shell
$ mkdir build
$ cd build
$ cmake ..
$ make
...
$ ./iwasm wasm-apps/no_pthread.wasm
...
$ ./iwasm wasm-apps/exception_propagation.wasm
```
## Run samples in AOT mode
```shell
$ ../../../wamr-compiler/build/wamrc \
--enable-multi-thread \
-o wasm-apps/no_pthread.aot wasm-apps/no_pthread.wasm
$ ./iwasm wasm-apps/no_pthread.aot
```