Shared conventions and development tasks for Rust projects in the base-rs organization.
Rust projects should share a small set of clear conventions and a reliable release process without repeating task wiring in every repository.
If socketry-cargo-bake is installed, run cargo uninstall socketry-cargo-bake first. Both packages provide the cargo-bake binary.
Install the launcher and create the private task package:
cargo install bake --locked
cargo bake --regenerateLet Cargo select the current dependency version:
cargo add --manifest-path bake/Cargo.toml base-projectIn bake/Cargo.toml, prefix the version selected by Cargo with >= to make it an open-ended minimum. Then run cargo bake --regenerate again to link the dependency's tasks. The command keeps generated links separate from task source, so no manual import in main.rs is needed. Run cargo bake --list to see the available tasks.
This adds the standard Cargo, release, license, Readme, Markdown, agent-context, and testing tasks, including test and test:external. It also registers a version-bump hook that updates the project's standard files and the license headers of its Rust files; license:check verifies in pull request CI that the hook would not change license.md or any Rust file's header.
It also includes base-design, which provides the design/*.md convention and the base-design-author and base-design-review skills. Capture specific project requirements, consider them before implementation, and validate them during pull request review. base-design contributes guidance and skills without adding Bake tasks.
It also includes base-security, which provides the security/ audit and advisory record formats and the base-security-audit and base-security-advisory skills. Record which files were reviewed for security issues at which revision, so later audits review only what changed, and take vulnerabilities from private report to published advisory. Like base-design, it contributes guidance and skills without adding Bake tasks.
See the repository setup skill for the minimal Cargo configuration and the conventions for repository layout, documentation, and code conventions. The Rust Repository Layout explains source organization. The testing skill sets expectations and points to bake-test for task and workflow details. The performance skill describes how to measure optimizations, decide which to keep, and report their results, and the benchmarks skill how to organize benchmark packages, harnesses, and committed results.
Prepare a release with cargo bake cargo:release:patch (or minor, major, or bump --version X.Y.Z) from a clean checkout of main; it bumps the version, commits with the Release: vVERSION trailer, validates the candidate, and opens the pull request. After review and merge, GitHub Actions publishes the release when the configured crates-io environment approves it, then creates or updates the matching GitHub Release from releases.md. Follow the shared Releasing skill for the standard process.
See releases.md for the full release history.
- Describe squash-only merging in the GitHub repository skill, and drop rebase merging from the releasing skill, which now refers to the GitHub repository skill for required checks.
- Keep title, commit, and description conventions in the pull request skill rather than repeating them in the GitHub repository skill. The pull request skill now says that titles become squash commit subjects and commit subjects are complete sentences, refers to the testing skill's 100% region coverage, and links to the Bake Releases readme for the
releases.mdformat, sincebake-releasessupplies no context guide.
- Require bake-agent-context 0.4.5, bake-cargo 0.9.3, bake-license 0.2.11, bake-markdown 0.6.2, bake-readme 0.3.2, bake-releases 0.3.9, and bake-test 0.3.9, which require
bake0.20 or later instead of an open requirement. bake-cargo 0.9.3 also installs Bake launcher 0.20.2 in generatedpublish.ymlandrelease-artifacts.ymlworkflows. - Require
bake0.20.2, the version the task binary already resolved. It was held at 0.20.0 because, in a workspace declaring Rust 1.87, the task crates' openbakerequirements resolvedbake0.19.2 alongside 0.20.2 and thebake/package failed to compile; with every task crate now requiringbake0.20 or later, Cargo resolves a singlebake0.20.2.
- Require bake-agent-context 0.4.4, bake-cargo 0.9.2, bake-license 0.2.10, bake-markdown 0.6.1, bake-readme 0.3.1, bake-releases 0.3.8, bake-test 0.3.8, base-design 0.1.1, and base-security 0.2.1. The Bake task crates' releases declare Rust 1.88, and the edition 2024 resolver prefers versions compatible with a workspace's
rust-version, so repositories declaring Rust 1.87 kept resolving their older releases;base-designandbase-securitydeclare 1.87 and are raised to match. A repository'sbake/package already needed Rust 1.88 to build, since Bake 0.20 uses let-chains; the canonicalminimum-rustjob skips it as a private package. Keep thebakeminimum at 0.20.0: in a Rust 1.87 workspace, requiring bake 0.20.2 makes the task crates' openbakerequirements resolve bake 0.19.2 alongside it, and the task package fails to compile.
Please open an issue or pull request on GitHub.
Run cargo bake agent:context:install to install shared context and skills. Use cargo bake agent:context:list and cargo bake agent:context:show to discover relevant guides, follow agents.md if present, and apply skills under .agents/skills/. The installer preserves repository-owned agents.md; it does not create or regenerate that file.