Call Rust functions in Svelte web app via WebAssembly. The function would be available as node module with name provided by package.name
in Cargo.toml
.
wasm-pack
npm i
: This'll also triggers prepare
script to build rust/wasm as local dependency first to pkg
folder.npm run preview
to serve preview.package.json
.Note: npm run dev
or check:watch
wouldn't work, for now.