
Rustc Basics
Compiler tuning reference for Rust developers who need to shrink binaries, speed up release builds, or read what the compiler is actually generating. Covers Cargo profile settings (LTO, codegen units, opt-level), RUSTFLAGS for target-specific optimization, and how to emit assembly or MIR for inspecting output. The monomorphization section is honest about generic code bloat and shows cargo-llvm-lines for measuring it. If you're debugging why your Rust binary is 50MB or wondering whether to use fat LTO versus thin, this gives you the flags and tradeoffs without making you read the rustc book cover to cover.
- skills.sh installs
- 567
- GitHub stars
- 279
- last updated
- Aug 21, 2026
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill rustc-basics --agent claude-codeInstalls into .claude/skills of the current project.
Files
rustc Basics
Purpose
Guide agents through Rust compiler invocation: RUSTFLAGS, Cargo profile configuration, build modes, MIR and assembly inspection, monomorphization, and common compilation error patterns.
Triggers
- "How do I configure a release build in Rust for maximum performance?"
- "How do I see the assembly output for a Rust function?"
- "What is monomorphization and why is it making my compile slow?"
- "How do I enable LTO in Rust?"
- "My Rust binary is too large — how do I shrink it?"
- "How do I read Rust MIR output?"
Workflow
1. Choose a build mode
# Debug (default) — fast compile, no optimization, debug info
cargo build
# Release — optimized, no debug info by default
cargo build --release
# Check only (fastest, no codegen)
cargo check
# Build for specific target
cargo build --release --target aarch64-unknown-linux-gnu
2. Cargo.toml profile configuration
Sponsors
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Categories
- DevOps & CI/CD, Release Management, Debugging, Rust
- First seen
- Jun 3, 2026
More from mohitmishra786/low-level-dev-skills
All 54- Rust Cross565
- Wasm Emscripten559
- Zig Debugging555
- Zig Build System552
- Zig Cross536
- Wasm Wasmtime532
- Zig Cinterop524
- Cmake1.8K
- Static Analysis1.2K
- Gdb1K
- Llvm948
- Sanitizers895
- Core Dumps828
- Linux Perf814
- Clang789
- Cross Gcc742
- Gcc741
- Valgrind740
- Flamegraphs728
- Assembly X86724
- Strace Ltrace711
- Cpu Cache Opt709
- Assembly Arm707
- Lldb703