A rate-my-day app.
This app is built in Rust and WebAssembly thanks to seed.rs framework.
-
Make sure you have basic tools installed:
- Rust
- Check:
$ rustc -V
=>rustc 1.43.1 (8d69840ab 2020-05-04)
- Install: https://www.rust-lang.org/tools/install
- Check:
- cargo-make
- Check:
$ cargo make -V
=>cargo-make 0.30.7
- Install:
$ cargo install cargo-make
- Check:
- Node.js + npm
- Rust
-
Platform-specific tools like
ssl
andpkg-config
:- Follow recommendations in build errors (during the next chapter).
- Open the project in your favorite IDE (recommended are VS Code + Rust Analyzer).
- Open a new terminal tab / window and run:
cargo make serve
- Open a second terminal tab and run:
cargo make watch
- Open a third terminal tab and run:
npm run watch
- Open localhost:8000 in a browser (We recommend Mozilla Firefox or Google Chrome).
- Modify source files (e.g.
/src/lib.rs
or/index.html
). - Watch compilation in the terminal tab where you run
cargo make watch
or where you runnpm run watch
. - You can watch dev-server responses in the tab where you run
cargo make serve
. - Refresh your browser and see changes.
- Go to this step 2.
- Run
cargo make verify
in your terminal to format and lint the code. - Run
cargo make build_release
. - Upload
index.html
andpkg
into your server's public folder.