Wasm-based Application: Tax Calculator
A Rust and wasm-bindgen experiment: build a WebAssembly tax calculator and serve it from a static page.
An experiment using wasm-bindgen to create a WebAssembly program. Built with wasm-bindgen 0.2.95.
Tools
rust 1.83.0wasm_test 0.3- CI
How to build and run
-
Create a library crate:
cargo new project --lib -
Add the crate type annotation for the compiler:
[lib] crate-type = ["cdylib"] -
Create a basic
index.htmlskeleton and extend the script block to handle loading and interacting with the wasm module. -
Install wasm-pack:
cargo install wasm-pack -
Build the project with wasm-pack:
wasm-pack build --target web -
Install a simple web server globally (if not installed):
npm install -g http-server -
Start the web server from the project root folder:
http-server .

License
This project is licensed under the MIT License.
Neighbors in time
when name
Related: the posts that share this one's subject, and where the thread goes next.