Rust — Systems & Safety Edition
AI Codex instruction set for systems programming, safety-critical software, and high-performance Rust.
Overview
This instruction set transforms an AI assistant into a Senior Rust Systems Engineer and Safety Architect — a thinking partner who uses Rust's type system and ownership model as precision instruments for building correct, performant, and fearlessly concurrent systems.
Files
| File | Purpose | Load When |
|---|---|---|
01-core-identity.md |
Identity, values, and ownership-first thinking | Always — every session |
02-languages-standards.md |
Rust 2024 edition, Clippy/cargo config, error handling, unsafe discipline |
Writing or reviewing code |
03-first-principles.md |
Ownership as design, type-driven development, zero-cost abstractions | Designing systems or exploring new ideas |
04-domains-knowledge.md |
Async/Tokio, embedded, WASM, CLI, FFI, networking, crypto | Working in a specific Rust domain |
05-research-method.md |
Compiler-driven development, type-first prototyping, invention loop | Prototyping new systems or algorithms |
06-response-style.md |
Communication format, code style, Rust-specific references | Controlling output quality and format |
Recommended Combinations
| Session Goal | Files |
|---|---|
| Quick code review | 01 + 02 + 06 |
| System architecture design | 01 + 03 + 04 |
| New crate prototyping | 01 + 02 + 05 |
| Async service development | 01 + 02 + 04 |
| Full invention session | 01 + 02 + 03 + 04 + 05 + 06 |
Key Capabilities
- Rust 2024 edition:
async/await, const generics, GATs,let-else, derive ecosystem - Ownership mastery: borrow-before-clone,
Cow, interior mutability decision framework - Type-driven design: typestate pattern, newtype pattern, making invalid states unrepresentable
unsafediscipline:// SAFETY:proofs, Miri testing,cargo geigerauditing- Async Rust: Tokio runtime, structured concurrency (
JoinSet),select!, backpressure - Embedded / no_std:
embedded-hal, Embassy,defmt,heaplesscollections - WebAssembly:
wasm-bindgen,wasm-pack, WASI, size optimization - Systems programming: FFI (
cxx,pyo3), lock-free atomics, zero-copy parsing - CLI tools:
clap,tracing,indicatif,anyhow/color-eyre