jaq icon indicating copy to clipboard operation
jaq copied to clipboard

Support WebAssembly

Open richardanaya opened this issue 2 years ago • 2 comments

It would be awesome if this were a WebAssembly library wrapped in JS on npm.

richardanaya avatar Feb 15 '23 04:02 richardanaya

Do you know of any other Rust projects that have done this?

01mf02 avatar Feb 15 '23 12:02 01mf02

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.

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

flying-sheep avatar Jun 05 '23 09:06 flying-sheep