rust-project-setup

Scaffolds Rust projects with Cargo.toml configuration, linting, workspaces, and CI pipelines.

2|Updated May 25, 2026
One-click install
npx skills add https://github.com/edheltzel/Do-Skills --skill rust-project-setup-edheltzel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-project-setup
Source: https://github.com/edheltzel/Do-Skills/tree/main/skills/engineering/rust/do-review-rust/references/rust-project-setup
Command: npx skills add https://github.com/edheltzel/Do-Skills --skill rust-project-setup-edheltzel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up a new Rust project involves many decisions—edition selection, MSRV, lint configuration, workspace layout, CI pipelines, and lockfile policy—that are easy to get wrong or inconsistent across projects. ## Core Features & Use Cases - Project Scaffolding Checklist: Step-by-step guidance for creating binaries, libraries, and multi-crate workspaces with correct Cargo.toml metadata, edition 2024 settings, and rust-version declarations. - Linting and Formatting Setup: Configures clippy lints, rustfmt.toml, and workspace-level lint inheritance, including edition 2024 deny-by-default behaviors. - CI and Dependency Management: Provides GitHub Actions workflows for check, clippy, test, fmt, and MSRV jobs, plus dependency versioning, feature flag design, and cargo-deny auditing. - Use Case: When starting a new Rust CLI tool, follow the checklist to configure Cargo.toml with edition 2024, set up clippy and rustfmt, add a GitHub Actions CI pipeline, and verify completion with objective gates like cargo metadata and cargo fmt --check. ## Quick Start Ask the agent to scaffold a new Rust project with proper Cargo.toml configuration, clippy linting, and a GitHub Actions CI pipeline.

Frequently Asked Questions about rust-project-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a new Rust project with best practices?▼

Run cargo init for binaries or cargo init --lib for libraries, then configure Cargo.toml with edition 2024, a rust-version MSRV, clippy lints, and release profiles. Add rustfmt.toml, set up a GitHub Actions CI workflow, and follow the lockfile policy for your crate type.

Should I commit Cargo.lock for my Rust project?▼

Commit Cargo.lock for binaries and applications to ensure reproducible builds. Do not commit it for libraries, since consumers resolve their own dependency versions; add Cargo.lock to .gitignore for library crates.

What changed in Rust edition 2024?▼

Edition 2024 makes unsafe_op_in_unsafe_fn deny-by-default, requires unsafe extern blocks, reserves the gen keyword, changes impl Trait lifetime capture, and adjusts temporary drop scopes. Run cargo fix --edition to auto-migrate most mechanical changes.

How do I set up CI for a Rust project on GitHub Actions?▼

Use dtolnay/rust-toolchain to install the toolchain and Swatinem/rust-cache for caching, then add jobs for cargo check, clippy with -D warnings, cargo test, and cargo fmt --check. Include an MSRV job matching the rust-version declared in Cargo.toml.

When should I use a Cargo workspace instead of a single crate?▼

Use a workspace when you have multiple related crates that share dependencies, need coordinated versioning, or have separate build targets like a binary plus library. Workspaces reduce compile times by sharing dependencies and build artifacts across members.

How do I make a Rust crate no_std compatible?▼

Add #![no_std] to switch the prelude to core, use an additive std feature flag rather than a subtractive no-std feature, and optionally extern crate alloc for heap types. Verify compatibility by building against a bare-metal target like thumbv7m-none-eabi in CI.