Support Matrix
Caution
WASM Threading is not standardized. Rust and
wasm-bindgenfrequently change theRUSTFLAGSneeded to compile with threading support enabled. If you cannot build with the example.cargo/config.tomlin this guide, please open an issue on GitHub.See the source-of-truth for cargo configs Here
Note
This page was last updated on:
2026-08-24
Toolchain minimum versions
- Rust:
Nightly 2026-05-06(latest tested1.100.0-nightly)- Nightly toolchain is required
- Wasm-bindgen:
>=0.2.127 - Wasm-pack:
masterNote
The current latest stable version,
0.15.0, has a version ofbinaryenover 2 years old. The master branch contains a newer version required to parse some syntax in the DeadCodeElimination pass.You can install
wasm-packfrom GitHub directly withcargo install wasm-pack --git https://github.com/wasm-bindgen/wasm-pack --branch master
Engine minimum versions
The JS engine must support the Exception Handling with exnref and Threading WASM features. See WebAssembly Feature Status for the most up-to-date version matrix.
The test suite in this project runs all examples on Google Chrome, Microsoft Edge, Firefox, Webkit, NodeJS v24, NodeJS v26, Deno and Bun. You can use the Playground to run the examples with your current browser.
- Chromium
>=151.0 - Firefox
>=153.0 - Webkit
>=revision 2092 - NodeJS
>=24.15(latest tested24.19.0,26.7.0)- Earlier versions may work through the
--experimental-wasm-exnrefflag
- Earlier versions may work through the
- Deno
>=2.3.2(latest tested2.9.5)- *Note that Deno has an issue where it takes ~5x longer to spin up a worker compared to other engines.
- Bun
>=1.3.14(latest tested1.4.0)- *Note that Bun has an issue where it sometimes segfaults when trying to grow WASM memory.
Warning
Even though technically the versions can be relaxed if you do not use
panic=unwind(meaning you do not need support for Exception Handling with exnref), the test suite only runs for the versions indicated above. Lower engine versions are not guaranteed to work since there can be subtle bugs or behavior differences in the APIs that we depend on.
wasm-pack Target Support
| Target\Engine | Chromium1 | Firefox1 | Webkit1 | NodeJS2 | Deno3 | Bun2 |
|---|---|---|---|---|---|---|
no-modules | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
web | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
nodejs4,7 | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ |
deno4,5 | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
bundler4,5,6 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Notes:
- 1: Browsers use the
WebWorkerAPI - 2: NodeJS and Bun use the
node:worker_threadsAPI - 3: Deno uses the
WorkerAPI because there were issues withnode:worker_threadsin the test harness setup. However, this might change in the future if the test harness can work around this issue. - 4: Targets other than
no-modulesandwebare supported, but you have to also generate the bindgen script for eitherno-modulesorweb. See Setup Guide for more details. - 5: Additional setup is needed because the
bundleranddenotargets do not support thewasm_bindgen::module()API. See Setup Guide for more details. - 6: None of the engines can natively import the package generated by the
bundlertarget. The test suite usesvitewith thevite-plugin-wasmplugin. - 7: The
nodejstarget generates CommonJS and is not recommended if your project is modern and uses ESM. You either need to rename the generated script to use the.cjsextension or remove"type": "module"frompackage.json, which may have additional consequences.
Rust std API support
If a std API is supported, it means you can use it with the threading model
of this library and expect behavior similar to a tier-1 Rust target.
Tip
You can use the Playground to see the examples listed below in action. The playground also links you to the source of the examples.
Note
Legend:
- ✅ Supported.
- 🟢 Not supported but a similar API is provided by this crate (for example
spawn).- ⚠️ Not tested but likely to be supported.
- ❓ Not tested and unsure if supported.
- ⛔ Unsupported.
| API | Supported? | Example |
|---|---|---|
std::sync::atomics::*1 | ✅ | example_arc_atomic |
std::sync::mpsc::* | ✅ | example_mpsc_channel |
std::sync::Arc | ✅ | example_arc_atomic |
std::sync::Barrier | ⚠️ | No tests yet |
std::sync::Condvar | ⚠️ | No tests yet |
std::sync::LazyLock | ⚠️ | No tests yet |
std::sync::Mutex2 | ✅ | example_mutex example_mutex_poison |
std::sync::Once | ⚠️ | No tests yet |
std::sync::OnceLock | ⚠️ | No tests yet |
std::sync::RwLock | ⚠️ | No tests yet |
std::sync::Weak | ⚠️ | No tests yet |
std::thread::Builder | ⛔ 3 | |
std::thread::JoinHandle | 🟢 | |
std::thread::LocalKey and thread_local! | ✅ | No tests yet |
std::thread::Thread::id() and ThreadId | ✅ | Used by harness |
std::thread::Thread::name() | ❓ | No tests yet |
std::thread::Thread::unpack() | ❓ | No tests yet |
std::thread::available_parallelism | ⛔ 4 | example_available_parallelism |
std::thread::current | ✅ | Used by harness |
std::thread::panicking | ❓ | No tests yet |
std::thread::park | ❓ | No tests yet |
std::thread::scope | ⛔ 3 | |
std::thread::sleep | ✅ | example_mutex example_mpsc_channel |
std::thread::spawn | 🟢 | |
std::thread::yield_now | ⛔ 5 |
Notes:
- 1: Atomics are part of the WASM threading proposal.
- 2: Poisoning works when
panic=unwind. - 3: A similar API might be added to this crate in the future.
- 4: Use
navigator.hardwareConcurrency. - 5: Does nothing. To run the thread co-operatively with the JS event loop, use
spawn_async.