Hi all, I’ve built d3-force-wasm, a port of d3-force 3.0.0 to WebAssembly (written in Zig) that aims to be a true drop-in: same API, same node and link objects, and the same output to the last bit, about 5× faster on one thread.
d3-force’s own test suite passes unchanged, and a parity harness compares every node against d3-force after every tick across 32 scenarios × 50 seeds.
If you have a project with a large or unusual force layout (custom forces, fx/fy pinning, custom random sources, forceLink with string ids), I’d be very grateful if you tried swapping the import and told me whether anything differs. Bit-exact means any difference at all is a bug.
Live demo, both side by side: d3-force vs d3-force-wasm
npm: https://www.npmjs.com/package/d3-force-wasm
GitHub: GitHub - ankitc1010/d3-force-wasm: Drop-in replacement for d3-force v3 with a Zig/WebAssembly core. · GitHub
One caveat: in Chrome the module loads its wasm with top-level await, so bundlers need an ES2022 target.