Building Your First WebAssembly Module
Building Your First WebAssembly Module
// In src/lib.rs
// use wasm_bindgen::prelude::*;
//
// #[wasm_bindgen]
// pub fn add(a: i32, b: i32) -> i32 {
// a + b
// }Build the npm package:
wasm-pack build --target web