An experiment using wasm-bindgen to create a WebAssembly program.
[📚 GitHub Repository]](https://github.com/maltsev-dev/tax_app_webassembly)
Tools
How to build and run:
- Create a library crate:
bash
cargo new project --lib
* Add crate type annotation for the compiler:
toml
[lib]
crate-type = ["cdylib"]
* Create a basic index.html skeleton and extend the script block to handle loading and interacting with the wasm module.
* Install wasm-pack:
bash
cargo install wasm-pack
* Build the project with wasm-pack:
bash
wasm-pack build --target web
* Install a simple web server globally (if not installed):
bash
npm install -g http-server
* Start the web server from the project root folder:
bash
http-server .
{{ img(src = "/media/wasm_tax_app.gif") }}
License
This project is licensed under the MIT License.