Steps I did (as notes):
- Create this Solid project.
- Install Rust
- Install wasm-pack (Use cargo)
- Create a new Rust project:
cargo new --lib hello-wasm - In Cargo.toml, add
wasm-bindgenas a dependency. (Handles the JS -> Rust communication type generation) - Write on the
lib.rs(Make a function that I can use. Also call the prelude and macro for wasm_bindgen to setup) - Run
wasm-pack build --target webon thehello-wasmproject. It will create apkgfolder witht he compiled wasm files (Important files:.wasmthe module,.jsfor imports, and.d.tsfor types - I think self-explanatory).