sharkdp/fd
Development workflow
The day-to-day cycle for working on fd.
1. Set up
git clone https://github.com/sharkdp/fd
cd fdYou need a Rust toolchain with rustfmt and clippy and at least version 1.90.0 (declared in Cargo.toml as rust-version). Any newer stable will also work for development; the MSRV is only enforced by the dedicated min_version CI job.
2. Pick a branch name and start a topic branch
git checkout -b fix/handle-empty-patternThe maintainers do not enforce a strict branch-name convention, but the historical pattern in merged PRs is fix/..., feature/..., or simply a descriptive slug.
3. Build and iterate
cargo build # debug
cargo build --release # what users get, with LTO and codegen-units = 1
# Run the binary you just built
./target/debug/fd README
# Or run via cargo (preserves args):
cargo run -- README -e mdCargo.toml defines a special debugging profile that inherits from dev but turns on full debug info:
[profile.debugging]
inherits = "dev"
debug = trueUse it when you need richer backtraces or want to attach gdb/lldb:
cargo build --profile debugging4. Verify locally
Before pushing, run the same three checks CI runs:
cargo fmt -- --check
cargo clippy --all-targets --all-features -- -Dwarnings
cargo test --all-featuresrustfmt.toml is intentionally minimal (one setting). The clippy bar is zero warnings on all features, so resolve them rather than allowing them.
5. Update the changelog
For user-visible changes, edit the Unreleased section of CHANGELOG.md and add a bullet under Features, Bugfixes, or Changes:
- Add `--ignore-parent` option to override `--no-ignore-parent`, see #1958 (@tmccombs)Skip this for typo fixes in docs.
6. Open the PR
- Title and description should explain the why, not just the what.
- If you used an AI assistant, say so in the description (see
CONTRIBUTING.md). - Reference the related issue with
Fixes #Nso it auto-closes when the PR merges.
7. CI
.github/workflows/CICD.yml runs:
| Job | Purpose |
|---|---|
crate_metadata |
Pulls the version, MSRV, and homepage out of Cargo.toml. |
ensure_cargo_fmt |
cargo fmt -- --check. |
lint_check |
cargo clippy --all-targets --all-features -- -Dwarnings. |
min_version |
Builds and tests against the declared MSRV (currently 1.90.0). |
test |
The full integration test suite across the build matrix. |
| Release jobs | Triggered on tags; build per-target archives and Debian packages. |
If a single target fails (for example, an obscure cross-compilation issue), the maintainers may still accept the PR — but a green CI is the goal.
8. Review and merge
The repo enforces standard GitHub PR review. Active maintainers (see maintainers) typically merge using GitHub's "Squash and merge" or "Rebase and merge" — the master branch history shows mostly merge commits, suggesting "Create a merge commit" is also in use.
Cross-compilation and release artifacts
Cross.toml configures cross images for non-native targets. For local cross-compiles:
cargo install cross
cross build --release --target x86_64-unknown-linux-muslReleases are tagged with vX.Y.Z and produce per-target archives via the release workflow.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.