Rust patterns for the 2024 edition, unsafe code, async locks, casts, Cargo features, and 1.75 to 1.100 changes. Load before any edit to a .rs file or Cargo.toml, however small, and for Rust questions.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Rust Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-rust-patterns)
---
name: rust-patterns
description: Rust patterns for the 2024 edition, unsafe code, async locks, casts, Cargo features, and 1.75 to 1.100 changes. Load before any edit to a .rs file or Cargo.toml, however small, and for Rust questions.
---
# Rust patterns
Default assumption: Rust 1.100 on the 2024 edition, per the Rust release notes. 1.100.1 shipped 2026-11-27, and a release ships every six weeks.
A row applies when the project's `rust-version` in `Cargo.toml`, else its installed `rustc --version`, is at least the row's version. A 2024 edition row applies when `Cargo.toml` sets `edition = "2024"`.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing Rust code, raising the toolchain, or moving a crate to the 2024 edition | [reference/upgrades.md](reference/upgrades.md) |
| Writing, changing, or reviewing Rust code | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Writing `unsafe`, a lint attribute, an assertion, a Cargo feature, `rust-version`, `Cargo.lock`, or a lock | [reference/practices.md](reference/practices.md) |
| Configuring rustc lints, Clippy, rustfmt, cargo-audit, cargo-deny, or Miri | [reference/tooling.md](reference/tooling.md) |