Thanks for considering a contribution. This document covers the essentials; the full conventions live in the Developer guide.
- By submitting a pull request, you agree to dual-license your
contribution under Apache-2.0 and MIT, matching the rest of the
project (see
LICENSE-APACHEandLICENSE-MIT). - All participants are expected to follow the Code of Conduct.
- Security-sensitive reports must not go in public issues — use GitHub's private vulnerability reporting on this repository.
git clone https://github.com/dekobon/host-identity
cd host-identity
cargo build
cargo test --all-features --workspaceMSRV is declared in the workspace Cargo.toml (rust-version).
For CLI contributors, ShellSpec is an
optional prerequisite for running the spec/ suite
(cargo xtask shellspec). See the
Developer guide.
Before pushing:
cargo fmt
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features --workspaceThe Developer guide is the canonical reference. Start there before making a non-trivial change. It covers:
- Rust style and error handling
- Naming conventions
- Testing discipline and assertion strength
- Conventional commit format
- GitHub CLI usage
- Documentation and changelog expectations
- Adding a new identity source (platform or cloud)
Highlights:
- Rust style:
cargo fmt, clippy clean with--all-targets --all-features -- -D warnings. Nounsafe_code. Avoidunwrap/expect/panic!outside tests. - Commits: Conventional Commits —
<type>(<scope>): <subject>. - Tests: add a regression test whenever you fix a bug. Assertions
must be specific (not
is_ok()without checking the value). - Docs:
///on public items; the crate warns onmissing_docs.
- Open an issue first for anything beyond a trivial fix. It's cheaper to discuss the design than to review a large PR against the grain of the project.
- Branch from
main. - Commit in small, reviewable steps. Each commit should build and pass tests on its own where practical.
- Run fmt, clippy, and tests before pushing.
- Open a pull request against
main. Fill in the PR template. Link the issue withFixes #NNNin the PR body. - Changelog: add an entry to
crates/host-identity/CHANGELOG.mdunder[Unreleased]for user-visible changes (API additions, behaviour changes, bug fixes). Refactors, docs-only, and CI changes don't need a changelog entry — the commit message is enough.
Criticism is welcome — point out mistakes, suggest better approaches, cite relevant standards. Be skeptical and concise. Reviews focus on correctness, API shape, and test coverage before style.
Open a GitHub Discussion or a low-priority issue. We'd rather answer a question than review a PR that went the wrong direction.