Rust CLI using clap (derive API) for argument parsing.
The version in Cargo.toml follows x.y.z-next on the main branch (e.g. 0.1.0-next). Never remove the -next suffix manually — CI handles that on release.
Run /copyright-headers to ensure all source files have Apache 2.0 license headers.
Always run the full check suite locally before staging:
cargo fmt --check && cargo clippy -- -D warnings && cargo test- Imports only used in tests must live inside the
#[cfg(test)]module, not at the top level — otherwise clippy's-D warningsflags them as unused. dtolnay/rust-toolchainrequires an explicittoolchain: stableinput, it has no default.
Pin actions by commit SHA with a version comment, using the actual latest release — not just the latest major tag:
uses: actions/checkout@<sha> # v6.0.2Before writing a uses: line, fetch the latest release and its SHA:
gh api repos/<owner>/<repo>/releases/latest --jq '.tag_name'
gh api repos/<owner>/<repo>/git/ref/tags/<tag> --jq '.object.sha'User is new to Rust — explain Rust-specific concepts (macros, import scoping, cargo commands) from first principles.