This is an unstable and experimental example of using threads with WebAssembly and Rust, culminating in a parallel raytracer demo. Current requirements for viewing this demo are:
- Firefox Nightly - other browsers haven't implemented the proposed WebAssembly features yet.
SharedArrayBufferis enabled in
This demo may also break over time as Firefox updates, but we'll try to keep it working!
Locally to build this demo you'll need
xargo and the
component, and afterwards
./build.sh like other examples should build the
Again, to reiterate, this is all experimental and we're working through various issues as we're working on this. If you're curious to see how this works it's best to explore via the source code right now! More info will be available here once WebAssembly threads are closer to stabilization.