Call rust from any language. Take a look at the example to get you started.
This requires wasm-multi-value-reverse-polyfill
to be in your path when targeting js:
cargo install --git https://github.com/vmx/wasm-multi-value-reverse-polyfill --locked
Apache-2.0 OR MIT