From 021f5490ab099f8c1ecaf42ef26db86a29232f13 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 12 Feb 2026 13:04:43 -0800 Subject: [PATCH 1/2] Adjust documentation of limitations in README * Update for C++ Exceptions being supported. * Update the threading-related bits slightly. * Indicate that dynamic linking works but may not be as fully tested. * Networking works, just not on WASIp1. --- README.md | 53 ++++++++++++++++++----------------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 97bb4f5..2d10373 100644 --- a/README.md +++ b/README.md @@ -209,41 +209,24 @@ disabled in a configure step before building with WASI SDK. ## Notable Limitations -This repository does not yet support __C++ exceptions__. C++ code is supported -only with -fno-exceptions for now. -Work on support for [exception handling] is underway at the -language level which will support the features. - -[exception handling]: https://github.com/WebAssembly/exception-handling/ - -See [C setjmp/longjmp support] about setjmp/longjmp support. - -[C setjmp/longjmp support]: SetjmpLongjmp.md - -This repository experimentally supports __threads__ with -`--target=wasm32-wasip1-threads`. It uses WebAssembly's [threads] primitives -(atomics, `wait`/`notify`, shared memory) and [wasi-threads] for spawning -threads. Note: this is experimental — do not expect long-term stability! - -Note that the `pthread_*` family of functions, as well as C++ threading primitives -such as ``, ``, and `` are available on all targets. -Any attempt to spawn a thread will fail on `--target=wasm32-wasip1` or -`--target=wasm32-wasip2`, but other functionality, such as locks, still works. -This makes it easier to port C++ codebases, as only a fraction of code needs -to be modified to build for the single-threaded targets. - -Defining a macro `_WASI_STRICT_PTHREAD` will make `pthread_create`, -`pthread_detach`, `pthread_join`, `pthread_tryjoin_np`, and `pthread_timedjoin_np` -fail with a compile time error when building for single-threaded targets. +* C++ exceptions are disabled by default. For more information see + [CppExceptions.md]. +* C `setjmp`/`longjmp` require some extra configuration to get working, see + [SetjmpLongjmp.md]. +* Most targets do not support spawning a thread. Experimental support for + spawning threads is available with the `wasm32-wasip1-threads` target which + uses [wasi-threads]. Note that the `pthread_*` family of functions, as well as + C++ threading primitives such as ``, ``, and `` are + available on all targets. Defining a macro `_WASI_STRICT_PTHREAD` will make + `pthread_create`, `pthread_detach`, `pthread_join`, `pthread_tryjoin_np`, and + `pthread_timedjoin_np` fail with a compile time error when building for + single-threaded targets. +* Dynamic linking [is supported][dylink] but not as fully baked as static + linking. There might be obscure bugs in some situations related to dynamic + linking. +* The WASIp1 targets do not support networking, but WASIp2/WASIp3 support + networking. [threads]: https://github.com/WebAssembly/threads [wasi-threads]: https://github.com/WebAssembly/wasi-threads - -This repository does not yet support __dynamic libraries__. While there are -[some efforts] to design a system for dynamic libraries in wasm, it is still in -development and not yet generally usable. - -[some efforts]: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md - -There is no support for __networking__. It is a goal of WASI to support -networking in the future though. +[dylink]: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md From 3eef752264c569c2551be141c81197746b748d38 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 13 Feb 2026 17:07:01 -0800 Subject: [PATCH 2/2] Add 64-bit limitation --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 2d10373..7d28f69 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,13 @@ disabled in a configure step before building with WASI SDK. linking. * The WASIp1 targets do not support networking, but WASIp2/WASIp3 support networking. +* 64-bit linear memories (a "wasm64" target) are not supported at this time. + Supporting this will require resolving [WebAssembly/component-model#22] first + at which point it will be possible to add a `wasm64-wasip2` target. There are + no plans to add support for `wasm64-wasi{,-threads,p1,p1-threads}` at this + time. [threads]: https://github.com/WebAssembly/threads [wasi-threads]: https://github.com/WebAssembly/wasi-threads [dylink]: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md +[WebAssembly/component-model#22]: https://github.com/WebAssembly/component-model/issues/22