jaq
jaq copied to clipboard
Support WebAssembly
It would be awesome if this were a WebAssembly library wrapped in JS on npm.
Do you know of any other Rust projects that have done this?
Do you know of any other Rust projects that have done this?
Loads. Since Rust compiles statically by default, has a very small runtime (much more C than Go or Java), and has a very new and therefore modern compiler toolchain, Rust is one of the best options to compile to WASM.
- The easy way is
wasm-pack. - The harder way is just
wasm-bindgen. Still pretty convenient. - The hard way is also possible if you’re a masochist.
I’d guess that most rust-to-wasm packages are built with wasm-pack, live in different repositories than the libraries they wrap and are published to npm.
There’s also other options, e.g.:
- https://www.npmjs.com/package/@wasm-tool/rollup-plugin-rust