CLAUDE.md@by-language/rustA

CLAUDE.md@by-language/rust from overseastelegramaliterateperson865/awesome-claude-md is a CLAUDE.md file: the standing instructions Claude Code reads in that repo.

Install it, pinned
mdr add overseastelegramaliterateperson865/awesome-claude-md/by-language/rust/CLAUDE.md@git:20260320.9b01aca

Pins git:20260320.9b01aca in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
CLAUDE.md file
Repository
overseastelegramaliterateperson865/awesome-claude-md
Path
by-language/rust/CLAUDE.md
Versions recorded
2
Latest version
git:20260320.9b01aca, committed Mar 20, 2026
First version recorded
Mar 20, 2026
Size
2,662 bytes
Repository stars
3
License
MIT

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# CLAUDE.md - Rust 项目规范

## 构建与运行

- 使用 Cargo workspace 管理多 crate,根 `Cargo.toml` 定义 `[workspace]`
- 构建:`cargo build`,测试:`cargo test --workspace`,检查:`cargo clippy --workspace -- -D warnings`
- 格式化:`cargo fmt --all`,提交前必须通过 `cargo fmt --check`

## 项目结构

- 顶层 workspace 按职责拆分 crate:`core/`、`api/`、`cli/`、`shared/`
- 共享类型和 trait 放在独立 crate 中,避免循环依赖
- `examples/` 目录存放可运行示例,保持与 API 同步更新

## 错误处理

- 库 crate 使用 `thiserror` 定义结构化错误枚举,每个变体附带上下文信息
- 应用 crate 入口使用 `anyhow::Result` 简化错误传播
- 禁止在库代码中使用 `.unwrap()` 和 `.expect()`,用 `?` 操作符向上传播
- 错误消息用小写英文开头,不以句号结尾,符合 Rust 社区惯例

## Clippy 与 Lint

- 在 `lib.rs` / `main.rs` 顶部启用严格 lint:
  `#![deny(clippy::all)]` 和 `#![warn(clippy::pedantic)]`
- 允许的例外必须附带 `#[allow(...)]` 并写明原因注释
- CI 中 clippy 警告视为错误,零容忍

## 测试规范

- 单元测试写在同文件底部的 `#[cfg(test)] mod tests` 中
- 集成测试放在 `tests/` 目录,每个文件是独立测试 crate
- 使用 `#[test]` 标注,异步测试用 `#[tokio::test]`
- 测试辅助函数放在 `tests/common/mod.rs`,避免重复代码
- 属性测试使用 `proptest` crate 覆盖边界条件

## Unsafe 策略

- 默认禁止使用 `unsafe`,在 `lib.rs` 中声明 `#![forbid(unsafe_code)]`
- 确实需要时必须经过 Code Review,并附带 `// SAFETY: ...` 注释说明不变量
- unsafe 代码必须有对应的 Miri 测试(`cargo +nightly miri test`)
- FFI 边界的 unsafe 封装在独立模块中,对外暴露安全接口

## 代码风格
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add overseastelegramaliterateperson865/awesome-claude-md/by-language/rust/CLAUDE.md@sha256:a545466578cfe48b

The line at the top of this page pins the label git:20260320.9b01aca, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_5a6ilpr2nmoflzgh.svg)](https://markdownregistry.com/a/art_5a6ilpr2nmoflzgh)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 2 versions of this file, all committed on Mar 20, 2026.

versioncommittedcommitsizeaudit
git:20260320.9b01aca latest2026-03-20 9b01aca 2,662 BA view · diff
git:20260320.fcf26092026-03-20 fcf2609 2,070 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (2662 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

overseastelegramaliterateperson865/awesome-claude-md · 3 stars · license MIT · pushed 2026-10-14 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_5a6ilpr2nmoflzgh
GET https://markdownregistry.com/api/v1/resolve?ref=overseastelegramaliterateperson865/awesome-claude-md/by-language/rust/CLAUDE.md
GET https://markdownregistry.com/api/v1/blob/a545466578cfe48b4313023ce835db9773ba75c2d68d7ed113b3556be7594892

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: what a CLAUDE.md file is · keeping AGENTS.md and CLAUDE.md in sync · which agent file does what.

More from overseastelegramaliterateperson865/awesome-claude-md

CLAUDE.md@by-framework/fastapi CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/fastapi/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-framework/nextjs CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/nextjs/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-framework/react CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/react/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-framework/spring-boot CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/spring-boot/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-framework/svelte CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/svelte/CLAUDE.md
git:20260405.ab9f266 · audit B · 3 stars
CLAUDE.md@by-framework/tauri CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/tauri/CLAUDE.md
git:20260320.fcf2609 · audit A · 3 stars
CLAUDE.md@by-framework/uni-app CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/uni-app/CLAUDE.md
git:20260320.fcf2609 · audit B · 3 stars
CLAUDE.md@by-framework/vue-nuxt CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/vue-nuxt/CLAUDE.md
git:20260320.fcf2609 · audit B · 3 stars
CLAUDE.md@by-language/go CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-language/go/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-language/java CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-language/java/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-language/python CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-language/python/CLAUDE.md
git:20260320.fcf2609 · audit A · 3 stars
CLAUDE.md@by-language/typescript CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-language/typescript/CLAUDE.md
git:20260320.fcf2609 · audit A · 3 stars

Every file in overseastelegramaliterateperson865/awesome-claude-md

Browse by kind, by grade A, or by owner.