Build the project with:
cargo buildFor release builds:
cargo build --releasecargo-mutants requires cargo-nextest to be installed for testing.
Run tests with:
cargo test --all-featuresOr with nextest:
cargo nextest run --all-featuresTests should have names that read like English sentences asserting a fact about behavior, like copy_testdata_doesnt_include_build_artifacts. Avoid "noise" words.
If the test exercises a particular test tree, option, or function, make sure that name literally occurs within the test name.
Tests run against trees under testdata/. These are stored with Cargo_test.toml (instead of Cargo.toml) to prevent cargo from seeing them as part of the main workspace.
Always use copy_of_testdata() to create a temporary copy before running tests. This function automatically renames Cargo_test.toml to Cargo.toml in the copy, so the test tree becomes a valid cargo workspace.
Describe the purpose of each testdata tree in its Cargo.toml or README.md.
Run cargo fmt before committing.
Run clippy checks:
cargo clippy --all-targets --all-features -- -D warningsThese are checked in CI and must pass.
Changes that have user-facing effects should be described in the appropriate section of the book (in book/src) and in NEWS.md.
Generally, variables and parameters should be the snake_case version of their type name: source_tree: SourceTree. However if that would be unclear or ambiguous, use a different name that does not repeat the type: src: &Path, dest: &Path.
See CONTRIBUTING.md and DESIGN.md for more detailed guidance on architecture, patterns, and contributing.