Repository navigation
Development
cd cli
cargo build --release --locked
cargo test --locked
cargo clippy --locked --all-targets
cargo doc --no-deps --openLinux needs libudev-dev and pkg-config. Cargo.lock is committed; use
--locked so a local build matches CI. The minimum supported Rust version is
1.90, declared in cli/Cargo.toml and tested in CI.
Release builds use thin LTO, one codegen unit and stripped symbols.
The code is split into a library and a thin binary. Start with src/lib.rs for
the module map, src/cli.rs for command definitions, src/protocol.rs for the
wire messages, and tests/device_sim.rs for the firmware simulator.
- Add a variant to
Commandincli/src/cli.rs. One-shot mode and the shell both use it, including the help text and clap validation. - Add the handler under
cli/src/commands/and route it incommands::run. - If the command needs a new wire message, add a
Requestvariant incli/src/protocol.rsand handle it inSystemController::handleSerialMessage_. - Add a simulator test in
tests/device_sim.rs, then update the CLI Guide and the protocol specification.
Build with the Arduino IDE or the upload scripts in firmware/; see
Firmware Setup. CI compiles the sketch for the ESP32-S3, but
there are no host-side firmware tests. Card reads, renewal, scan, import and
sync still need a smoke test on a real board.
The workflows live in .github/workflows/.
| Workflow | Trigger | What it does |
|---|---|---|
cli.yml |
Changes under cli/** or the workflow file |
cargo test --locked on Ubuntu, Windows and macOS with stable Rust; cargo test --locked on Rust 1.90; clippy (advisory) |
firmware.yml |
Changes under firmware/** or the workflow file |
Installs the ESP32 core and libraries, then compiles for the ESP32-S3 with the uploader FQBN |
release.yml |
A tag matching v*
|
Builds Windows x64, Linux x64, macOS arm64 and macOS x64 archives with SHA-256 files |
-
Bump
versionincli/Cargo.toml, then runcargo update --workspacesoCargo.lockfollows. A--lockedbuild fails if the two disagree. -
Update the Changelog and the current-version lines in
_Footer.md,Home.mdandREADME.md. -
Tag and push:
git tag v2.0.1 git push origin v2.0.1
The release workflow rejects a tag that does not match cli/Cargo.toml. Tags
follow the CLI version. The firmware version is separate and is not part of the
release assets.
GateCore · gatecore-firmware 1.2.0 · gatecore-cli 2.0.1 · ESP32-S3 + PN532
README · Changelog · Issues · MIT License