rust-impl-cargo-project
Installation
SKILL.md
rust-impl-cargo-project
The single-crate Cargo project setup skill: how to scaffold a crate, structure its Cargo.toml, declare dependencies safely, design features that obey the additive principle, tune profiles, override third-party code with [patch] / [replace], configure package-level lints via the [lints] table, and opt into the MSRV-aware resolver introduced in Rust 1.84.
Cross-references: [[rust-impl-workspaces]] (multi-crate layout with [workspace]), [[rust-core-toolchain]] (rustup channels, components, rust-toolchain.toml), [[rust-core-language-versions]] (which features stabilized in which release), [[rust-impl-build-scripts]] (build.rs, OUT_DIR, cargo:: directives).
When to use this skill
- User runs
cargo neworcargo initand asks lib vs bin, what edition, where files go. - User edits
Cargo.tomland asks about[package],[dependencies],[dev-dependencies],[build-dependencies], or target-specific dependencies. - User asks about version requirements: caret vs tilde vs exact vs wildcard.
- User designs a feature flag, hits a non-additive design, or asks about
dep:/?syntax. - User tunes
[profile.release], defines a custom profile, or asks about LTO,opt-level,codegen-units,strip,panic. - User wants to override a transitive dependency via
[patch.crates-io]or[replace]. - User wants project-wide lint configuration via the
[lints]table. - User wants
cargo addto pick versions compatible with their MSRV (Rust 1.84+ resolver).