rust-ecosystem
Skill1 starsChanged 40 days agoMITView on GitHub
Rust ecosystem and project setup — choosing crates, Cargo.toml and dependencies, features, workspaces, editions/MSRV, module layout, and publishing libraries. Use when adding a dependency, structuring a project or workspace, configuring Cargo, or preparing a crate to publish. Triggers: Cargo.toml, cargo add, feature flag, workspace, edition, MSRV, semver, which crate.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- adxptived/Rust-Skillstheir own version, first seen Oct 17, 2026
- JSBtechnologies/rustkbtheir own version, first seen Oct 11, 2026
- huiali/rust-skillstheir own version, first seen Feb 9, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- huiali/rust-skills★ 47same name
- adxptived/Rust-Skills★ 1same name
- JSBtechnologies/rustkb★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- addressing-findingsSkill
- auditSkill
- codebase-onboardingSkill
- codex-reviewSkill
- compatibilitySkill
- debuggingSkill
- developSkill
- distributed-racesSkill
- memorySkill
- nix-dev-envSkill
- nix-flakesSkill
- nixosSkill
- nix-packagingSkill
- nix-reviewSkill
- refactoringSkill
- retroSkill
- review-initSkill
- review-rulesSkill
- rust-architecture-reviewSkill
- rust-architectureSkill
- rust-cliSkill
- rust-cloud-nativeSkill
- rust-concurrencySkill
- rust-embeddedSkill
- rust-errorsSkill
- rust-fintechSkill
- rust-idiomsSkill
- rust-macrosSkill
- rust-mlSkill
- rust-navigationSkill
- rust-ownershipSkill
- rust-performanceSkill
- rust-pluginsSkill
- rust-reviewSkill
- rust-securitySkill
- rust-testingSkill
- rust-traitsSkill
- rust-unsafeSkill
- rust-webSkill
- specsSkill
- sql-reviewSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Prefer the ecosystem's de-facto crates (serde, tokio, clap, …) over novelty — they're documented, supported, and what reviewers expect.
- Very specific: line 47
Commit Cargo.lock for binaries (reproducible builds), not for libraries (let consumers resolve).
- Distinctive: line 58
Use the latest edition for new projects (editions are opt-in and per-crate.
- Very specific: line 72
Put real logic in a library crate and keep main.rs a thin shell — it makes the code testable and reusable (this is also the spirit of …
- Distinctive: line 98
When/how to extract code into its own crate, or merge an over-split one → crate-extraction.md.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Rust Ecosystem & Project Setup
Choosing dependencies, wiring up Cargo, and structuring a project — the decisions around the code rather than in it. Deep Cargo mechanics and library/publishing concerns are in the sub-files.
When to Use
- Adding or evaluating a dependency
- Structuring a project, workspace, or module tree
- Configuring
Cargo.toml, features, edition, MSRV - Preparing a library to publish (semver, docs, interop)
Choosing a crate
A dependency is a long-term liability — vet before adding:
| Check | Why |
| Maintenance | recent commits/releases; open-issue responsiveness; not abandoned |
| Adoption | downloads / reverse-deps; widely-used crates are battle-tested |
| API surface & semver | post-1.0? churny pre-1.0 APIs cost you upgrades |
| Dependency weight | how many transitive deps + compile-time it drags in |
| License | compatible with yours (→ rust-security) |
unsafe / soundness | audited? unsafe-surface scan → rust-security |
Prefer the ecosystem's de-facto crates (serde, tokio, clap, …) over novelty — they're documented, supported, and what reviewers expect. Don't pull a crate for a few lines you can write yourself; do pull one for anything security- or correctness-sensitive (crypto, parsing, time).
Cargo basics
cargo add serde --features derive # edit Cargo.toml for you (cargo-edit, now built in)
cargo update # bump within semver ranges; updates Cargo.lock
cargo tree --locked # inspect the dependency graph (never rewrites Cargo.lock)
cargo tree -d --locked # find duplicate versionsCommit Cargo.lock for binaries (reproducible builds), not for libraries (let consumers
resolve). Dependency versions, features, and workspaces → cargo.md.
Project defaults
[package]
edition = "2024" # latest edition; opt into new idioms
rust-version = "1.85" # declare your MSRV so Cargo can enforce it- Use the latest edition for new projects (editions are opt-in and per-crate; they don't split the ecosystem).
- Declare MSRV (
rust-version) if anyone consumes your crate — and test it (cargo-hack,cargo-msrv). - Turn up clippy lints (
[lints.clippy]) →rust-idioms.
Project layout
| Shape | Use |
single src/main.rs | a small binary |
src/lib.rs + src/main.rs | logic in the lib (testable), thin binary on top — preferred for anything non-trivial |
workspace ([workspace] members = [...]) | multiple related crates sharing a lockfile and target/ |
Put real logic in a library crate and keep main.rs a thin shell — it makes the code testable
and reusable (this is also the spirit of rust-architecture). Module tree and mod/visibility
mechanics → rust-idioms (visibility) and cargo.md (workspaces). When and how to pull a module
out into its own crate (or merge an over-split one) → crate-extraction.md.
Supply-chain hygiene
cargo machete # find unused dependencies
cargo tree -d --locked # find duplicate/conflicting versions; no Cargo.lock (a library) → run it in a throwaway copy of the checkoutTrim what you don't use and de-duplicate the graph to keep the dependency liability in check.
Vulnerability/advisory scanning and license/supply-chain policy (cargo-audit/cargo-deny) →
rust-security (ties into rust-review's and rust-security's gates).
Boundaries
- Publishing a library — semver discipline, public-API hygiene, doc conventions, interop → libraries.md (drawing on the Rust API Guidelines and Microsoft's Pragmatic Rust Guidelines).
- Dependency vulnerabilities, license/supply-chain policy, and unsafe-surface scanning
(cargo-audit/deny/geiger) →
rust-security. - Build profiles for speed/size (LTO, codegen-units) →
rust-performance. - Build scripts (
build.rs),no_std, and cross-compilation → build-and-targets.md. - Naming and visibility idioms →
rust-idioms. - When/how to extract code into its own crate, or merge an over-split one → crate-extraction.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

