agentleFS
sasuketoriisasuketorii/rev_harness_public/.agents/skills/rust-skills-knowledge-pack/SKILL.md

rust-skills-knowledge-pack

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

RustSkills systems architecture and implementation skill. Use when designing, reviewing, implementing, benchmarking, or updating high-load Rust async HTTP workers, Leptos/WASM builders, Ratatui+CPAL realtime audio agents, E2EE/privacy infrastructure, autonomous AI/data/search platforms, and Rust dependency governance.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always use rust-skills-master.md as the single source of truth, rust-skills-sources.md as the source registry, and references/*.md as lane …

    line 48
  2. Very specific:

    Use reqwest for business HTTP.

    line 67
  3. Distinctive:

    Do not store raw PII in vector payloads.

    line 107
  4. Very specific:

    Only after Rust 1.96 lands and cargo fix --edition has been rerun against the entire workspace.

    line 142
  5. Distinctive:

    Run local checks when a repo exists:

    line 200
  6. Very specific:

    Use rust-skills-update-prompt.md for ChatGPT / Claude / Gemini Deep Research.

    line 213
  7. Distinctive:

    Every dependency decision must include: version diff, yanked status, advisory status, feature/default-feature diff, MSRV, license, …

    line 215
  8. Distinctive:

    When asked to make or review an implementation, respond with:

    line 221

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

RustSkills Skill Hub

  • Document ID: rust-skills
  • Version: v0.1.2
  • Snapshot date: 2026-04-29 JST
  • Registry recheck: 2026-05-06 JST spot-check via crates.io/cargo
  • Generated from: rust-skills-master.md
  • Target context: your organization / RustSkills / autonomous-agent CRM platform / high-throughput messaging infrastructure / Leptos Web Builder / TUI AI Agent / E2EE Infrastructure

この SKILL.md は、Codex / Claude Code / ChatGPT Skills で軽く読み込ませるための入口。rust-skills-master.md が単一の真実源であり、references/ はMasterから切り出したレーン別詳細である。参照ファイルは独立した意思決定元ではなく、Masterと矛盾する場合は必ずMasterを優先する。


1. Non-negotiable rules

  • 高負荷クローラー、フォーム送信、秘匿通信、AIエージェントは、許可済み業務、同意済みデータ処理、正当な負荷試験、自社管理対象 に限定する。
  • 外部サービスへ負荷をかける処理は、必ずレート制限、監査ログ、バックプレッシャー、停止スイッチ、失敗分類を持つ。
  • PII、secret、token、鍵素材、音声データ、心理推定データはログへ出さない。
  • 匿名性・暗号化は、プライバシー、機密性、耐障害性、検閲耐性、内部統制のために使う。
  • 無制限 spawn、unbounded channel、requestごとの Client 作成、callback内alloc、lock保持中await、巨大JSON一括deserializeを禁止する。
  • 速さはp50/p95/p99、RSS、allocations/op、WASM size、callback duration、handshake latency、vector search latencyで判断する。
  • pre / alpha / beta / rc / dev は最新安定版として扱わない。
  • yanked versionは採用しない。
  • 暗号・TLS・Noise・HPKE・QUICは cargo audit / cargo deny と transitive dependency を必ず確認する。

2. Lane decision map

LaneUse whenLoad reference
Async I/Otokio/reqwest/tower/hyper/bytes設計、API、ジョブ、LLM通信references/async-io.md
Crawler/Form Sender許可済み大量HTTP処理、フォーム抽出、送信制御references/crawler-form-sender.md
Browser Automation/CDPJSレンダリング済みページ、SPAフォーム、スクリーンショット、QAreferences/browser-automation-cdp.md
Extreme Linux I/Otokio-uring/monoio/io_uring/thread-per-core検証references/extreme-io-linux.md
Leptos/WASMWeb Builder、SSR、hydration、WASMサイズ最適化references/leptos-wasm-builder.md
TUI Realtime Audioratatui/cpal/ringbuf/音声callback/LLM streamreferences/tui-realtime-audio-agent.md
E2EE/Cryptorustls、x25519、ed25519、hpke、snow、graviolareferences/e2ee-crypto.md
AI/Data/SearchSurrealDB、SQLx、Polars、Qdrant、LanceDB、Tantivy、rkyvreferences/ai-data-search.md
Memory/Perfrkyv、simd-json、jemalloc、talc、smallvec、bumpalo、dashmapreferences/memory-performance.md
Observability/Updatetracing、cargo audit/deny/outdated、source governancereferences/observability-update-governance.md

Always use rust-skills-master.md as the single source of truth, rust-skills-sources.md as the source registry, and references/*.md as lane detail extracts. Do not treat reference files as new promises, separate source registries, or complete replacement documents for the master.


3. Canonical architecture patterns

3.1 High-load HTTP

input stream
  -> bounded queue
  -> per-key governor limiter
  -> tower Service stack
  -> reqwest standard client or hyper hotpath client
  -> response classifier
  -> audit/event sink
  -> retry/dead-letter queue

Use reqwest for business HTTP. Use hyper + bytes only for measured hot paths. Use chromiumoxide only when JS-rendered browser state is required. Never create a new reqwest::Client per request.

3.2 Realtime audio

cpal callback
  -> ringbuf SPSC
  -> frame aggregator
  -> VAD/resample/encode worker
  -> LLM/ASR stream
  -> TUI state reducer
  -> ratatui render loop

Callback code must be allocation-free, non-blocking, and must not perform network I/O or JSON parsing.

3.3 E2EE / privacy

public edge: rustls / mTLS / short-lived certs
payload layer: hpke or snow, R&D-gated
identity: ed25519-dalek
key exchange: x25519-dalek
AEAD: chacha20poly1305 or aes-gcm
storage: argon2 + AEAD + zeroize discipline

For HPKE and QUIC, check advisories on both direct crates and transitive crates such as hpke-rs-rust-crypto, quinn-proto, rustls-webpki, and aws-lc-sys.

3.4 AI/Data

PostgreSQL/sqlx: auth, billing, audit, strong consistency
SurrealDB: document-graph state, agents, workflows
Qdrant/LanceDB: vector retrieval
Tantivy: full-text search
Polars: offline/batch features
rkyv: frozen snapshots and context bundles

Do not store raw PII in vector payloads. Keep deletion and consent boundaries explicit.


3.5 Forward-looking / R&D status labels

This pack documents both currently-adopted patterns and forward-looking work that adopting projects must gate behind a dedicated migration slice. Every forward-looking topic carries an explicit Status: label so router callers and reviewers can tell at a glance which rows are Adopt-now vs. R&D-only.

Status: values used throughout this pack:

  • Status: Adopt — already in scope for current RustSkills code.
  • Status: informational refresh — patch-level upstream tracking; no behavioral change required.
  • Status: R&D — evaluate behind a feature flag or in a sandbox; do not enable in product Cargo manifests without a separate slice.
  • Status: R&D + DR — R&D plus a Deep Research source pack refresh is required before any adoption decision (see rust-skills-update-prompt.md).
  • Status: R&D + DR + workspace migration slice required — reserved for cross-cutting upgrades that touch product Cargo.toml / Cargo.lock or database access patterns.

Forward-looking row catalog (each row is R&D-only at the pack level; adopter projects override per-workspace). Status label appears on its own line so that router callers can grep ^Status: at the start of a line.

3.5.1 Rust 1.96 toolchain

Status: R&D + DR MSRV bump requires per-product audit + cargo deny rerun. Coordinate with edition 2024 migration row before any product Cargo manifest change.

3.5.2 edition 2024 migration

Status: R&D + DR Only after Rust 1.96 lands and cargo fix --edition has been rerun against the entire workspace. No edits to product Cargo.toml from this pack alone.

3.5.3 aws-lc-rs Rustls provider

Status: R&D Evaluate as alternative to ring / default rustls provider. Requires advisory review, interop test against existing quinn / rustls stack, and per-target build matrix.

3.5.4 cargo-vet supply-chain attestation

Status: R&D Sandbox in CI before enforcing import gates. Start with informational mode and graduate to enforcing once trust set is populated.

3.5.5 OpenTelemetry / opentelemetry-rust integration

Status: R&D Replaces ad-hoc tracing exporters. SLO + cardinality sign-off required before enabling default exporters in production binaries.

3.5.6 HTTP/3 / hyper 1.6 / h3 / quinn rollout

Status: R&D Requires patched quinn-proto >= 0.11.14 plus rollout gating. Do not enable on public edges by default; canary behind a per-workspace feature flag.

3.5.7 sqlx 0.7 → 0.9 major upgrade

Status: R&D + DR + workspace migration slice required sqlx 0.8 is the transitional anchor; query macro / Connection trait changes need a per-workspace migration slice that re-runs the offline query cache.

3.5.8 tokio / hyper / reqwest / wasm-bindgen / cargo-deny patch bumps

Status: informational refresh Track upstream patch advisories; no migration slice unless an advisory is involved or MSRV moves.

None of the forward-looking rows above sit inside an Adopt section. Adopting workspaces must encode their own Adopt baseline (pinned versions, MSRV, feature flags) inside the workspace Cargo.toml and surface drift via the relevant audit harness, not by editing this pack.


4. Current critical watchlist

TargetStatusRequired action
ringbufv0.5.0 appears as crates.io latest at 2026-05-06 recheck; previous 0.4.9 yanked issue is historicalverify changelog/API diff before upgrading existing audio pipelines
quinn / quinn-protoquinn latest docs show 0.11.9; quinn-proto advisory patched at >=0.11.14lockfile must resolve patched quinn-proto; otherwise hold QUIC rollout
hpke-rs / hpke-rs-rust-crypto0.6.1 is latest; advisories are patched at >=0.6.0R&D only until audit, test vectors, provider choice, and cargo audit pass
graviola / rustls-graviolapromising Rustls provider candidateR&D only; verify CPU feature, interop, fallback, advisory status
tokio-uring / monoioLinux-specific extreme I/Obenchmark first; standard Tokio fallback required
distx / distx-coreR&D similarity engineverify yanked/version history and production readiness
talcWASM/no_std allocatorA/B test WASM size, allocation behavior, runtime stability
chromiumoxideCDP/Chromium automation; Chrome binary/process dependencyauthorized QA/rendering only; pool browsers; monitor CDP/chromium compatibility

5. Update workflow

  1. Run local checks when a repo exists:
cargo metadata --format-version 1 > target/rustskills-cargo-metadata.json
cargo tree -e features > target/rustskills-cargo-tree-features.txt
cargo audit > target/rustskills-cargo-audit.txt || true
cargo deny check > target/rustskills-cargo-deny.txt || true
cargo outdated > target/rustskills-cargo-outdated.txt || true
cargo nextest run
cargo clippy --all-targets --all-features -- -D warnings
cargo test --doc
  1. Use rust-skills-update-prompt.md for ChatGPT / Claude / Gemini Deep Research.
  2. Register evidence in rust-skills-sources.md, make decisions in rust-skills-master.md, then propagate changed details to references/*.md, SKILL.md, rust-skills-update-prompt.md, and README.md.
  3. Every dependency decision must include: version diff, yanked status, advisory status, feature/default-feature diff, MSRV, license, benchmark impact, and project impact.

6. Minimal answer format for agents

When asked to make or review an implementation, respond with:

Decision: Adopt / Hold / Reject / R&D
Reason:
Required crates:
Forbidden patterns:
Architecture:
Tests:
Observability:
Security/compliance:
Files to change:

For deep research updates, follow the full format in rust-skills-update-prompt.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.