WASI SDK Limitations and Compatibility
mainWhen developing with WASI SDK, be aware of the following constraints:
- C++ Exceptions: Disabled by default. Requires extra configuration.
- setjmp/longjmp: Requires extra configuration.
- Threading: Most targets do not support spawning threads. Experimental support is available via the
wasm32-wasip1-threadstarget (usingwasi-threads).- The
pthread_*family and C++ primitives (<atomic>,<mutex>,<thread>) are available on all targets. - To catch errors when building for single-threaded targets, define the macro
_WASI_STRICT_PTHREADto make threading functions fail at compile time.
- The
- Dynamic Linking: Supported, but less mature than static linking; may contain obscure bugs.
- Networking: WASIp1 targets do not support networking. WASIp2/WASIp3 support networking.
- 64-bit Memory:
wasm64targets are not currently supported.