Thank you for your interest in contributing! This document covers how to get started, the development workflow, and the standards we hold contributions to.
For AI coding agents: also read AGENTS.md, which contains more detailed technical guidance.
- Rust stable toolchain — install via rustup.rs.
- No database, Docker, or external services are required. Dumpling is a pure CLI tool.
./scripts/setup-dev.shInstalls stable + rustfmt + clippy, prefetches crates, and downloads a pinned mdBook under .tools/ (for mdbook build, same version as CI). Optional: export PATH="$PWD/.tools:$PATH".
cargo build
./target/debug/dumpling --help
# Or release build
cargo build --release
./target/release/dumpling --helpcargo test --all-targets --all-featuresAll tests live in inline #[cfg(test)] modules inside each source file. There are no separate test directories.
cargo fmt # apply formatting
cargo fmt --all -- --check # check formatting (what CI runs)
cargo clippy --all-targets --all-features # lint (zero warnings required)Every pull request must pass all three checks:
| Check | Command |
|---|---|
| Formatting | cargo fmt --all -- --check |
| Lint | cargo clippy --all-targets --all-features |
| Tests | cargo test --all-targets --all-features |
Run all three locally before opening a PR. Clippy warnings are treated as errors — fix the code rather than adding suppression attributes.
- Imports at the top: All
usestatements belong at the top of each module. Never place them inside function bodies (except to resolve circular imports). - Error handling: Use
anyhow::Resultand.with_context(|| …)for propagated errors;anyhow::bail!(…)for early exits. Add descriptive context messages so failures are actionable. - Comments: Only add comments that explain non-obvious intent, trade-offs, or constraints. Do not narrate what the code already says clearly.
- Unsafe: The only existing
unsafeblock is the PRNG seed intransform.rs. Do not add newunsafecode without strong justification.
- Fork the repository and create a branch from
main. - Make your changes with focused, well-described commits.
- Ensure all three CI checks pass locally.
- Open a pull request with a clear description of what changed and why.
For bug fixes, include a test that reproduces the bug before your fix and passes after it.
For new features (e.g., a new anonymization strategy or predicate operator), consult the step-by-step guides in AGENTS.md and include tests and README.md updates.
The project documentation is built with mdBook from sources in docs/src/. To build locally:
mdbook buildThe README.md in the repository root is the primary reference for users. Keep it up to date when adding new strategies, CLI flags, or config options.
See docs/src/releasing.md for the full release process runbook.