CLI
Scaffold, validate and run applications through Cargo.
On this page
The cargo-inrux executable adds project scaffolding, .iru validation and a rebuild/restart watcher. Cargo still compiles Rust. You can use plain cargo check, cargo run and cargo test.
Install from the checkout
cargo install --path packages/inrux-cli --locked
Run this from the repository root. Before a crates.io release, use local path dependencies and keep the framework checkout.
Commands
| Command | Purpose |
|---|---|
cargo inrux new <directory> --framework-path <checkout> --backend egui | Create a starter with an explicit engine |
cargo inrux check | Forward to Cargo check |
cargo inrux build | Forward to Cargo build |
cargo inrux run | Forward to Cargo run |
cargo inrux dev | Watch, rebuild and restart a preview process |
cargo inrux validate src/App.iru | Check framework and embedded Rust syntax |
Use masonry or gpui as the backend when scaffolding those engines. Validate does not replace rustc type checking. Use --manifest-path, -p or --bin to select another project or executable as supported by the forwarded Cargo command.
Watcher behavior
The watcher uses notify, coalesces source edits and rebuilds with Cargo. A failed build leaves the last successful preview running. A successful build replaces the preview process. The replacement loses in-memory application state; this is not state-preserving hot reload.
Keep assets in watched source/assets directories. This CLI is not a general asset bundler. See the CLI source guide for process ownership and command details.