Skip to content

ivmarkov/ruwm

Repository files navigation

ruwm

[Ru]st [W]ater [M]eter - my explorations into an embedded, async, real-world project

CI Documentation

(Work in Progress)

(Once in, hit F12 in the browser window to open the Dev Tools Console and see the demo logs.)

How to build?

Easiest is to build the demo.

  • The demo is the actual Water Meter Rust application - together with its Web UI - deployed as a browser (WASM) application.
  • The left part of the screen is hal-sim - a small embedded-hal & embedded-graphics simulator that implements the GPIO, ADC and Display traits and allows the user to interact with these via the browser.

To build:

  • Get rustup.
  • Add the wasm target
rustup target add wasm32-unknown-unknown
cargo install trunk
  • Clone, build and run the simulator demo app
git clone https://github.com/ivmarkov/ruwm
cd ruwm/ruwm-sim
trunk serve -w . -w ../ruwm -w ../ruwm-web
  • Go to http://localhost:8080/ to see the demo in action
  • Hit F12 in the browser to see the app logs in the Dev Tools Console

Faster edit-compile-deploy-test cycle

Note that the demo you are running via Trunk is - in fact - live. You can change from e.g. VSCode any part of the app code (its backend that would in reality run on the actual MCU, or the Web UI) and then hit save and - voila - in a few seconds Trunk will reload the app in the browser!

A bit like Frontend development workflow, but for embedded.

How to build the actual ESP32 firmware?

TBD

About

[Ru]st [W]ater [M]eter - my explorations into an embedded, async, real-world project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published