Build and test
All commands run from the repository root (inside nix develop if you use Nix). The authoritative description of
targets, chip features and why they are never combined is Targets and features.
On the host
cargo test # portable crates, framing, dispatcher, rohi client end to end
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
No board is needed. What the host tests cover and what they cannot is in Host testing.
For the ESP chips
cargo check-esp32c3 # ESP32-C3 (riscv32imc-unknown-none-elf)
cargo check-esp32c6 # ESP32-C6 (riscv32imac-unknown-none-elf)
cargo build-esp32c3 # release build
cargo build-esp32c6
Flash and run
Connect the board via USB:
cargo run --release -p altruist-urban --features esp32c3 --target riscv32imc-unknown-none-elf
# ESP32-C6
cargo run --release -p altruist-urban --features esp32c6 --target riscv32imac-unknown-none-elf
The runner flashes the chip’s partition table, which reserves the configuration region
(Flash layout). Examples are built the same
way with -p rohi-examples --features esp32c3 --target riscv32imc-unknown-none-elf --bin example-<name>.
Documentation
mdbook build docs # the book
mdbook test docs # plain Rust snippets of the book
cargo doc --no-deps # API reference of the host crates
See Documentation style and policy for the checks that CI runs.
Next
First device runs a sensor example on hardware; Hardware testing lists what is validated on devices.