cargo install wasm-pack
cargo install cargo-make
cargo install simple-http-server
Theres 2 ways available to build the project, either using wasm-pack
only or by using wasm-back
through the make
task.
# using wasm-pack only
bash ./build.sh
# using the make task
cargo make build
After building the project, you can run an HTTP server to serve the files. Is important to note that the HTTP Server in question must have support for wasm.
If you have installed the simple-http-server
then you can run the following, in the current directory:
cd ./static/ && simple-http-server
And then, open your browser in http://localhost:8000/
Follow Sheshbabu Chinnakonda's post on Single Page Applications using Rust to learn more about Rust for the Front-End development.