01mf02 / jaq

A jq clone focussed on correctness, speed, and simplicity
MIT License
2.86k stars 76 forks source link

Support WebAssembly #57

Open richardanaya opened 1 year ago

richardanaya commented 1 year ago

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

01mf02 commented 1 year ago

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

flying-sheep commented 1 year ago

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.: