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-code

Installs 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
1rkiding avataralphaear-signal-trackerrkiding/awesome-finance-skillsTrack finance investment signal evolution and update logic based on new finance market information. Use when monitoring finance signals and determining if they 563skills.sh installs
2wanshuiyin avatarformula-derivationwanshuiyin/auto-claude-code-research-in-sleepStructures and derives research formulas when the user wants to 推导公式, build a theory line, organize assumptions, turn scattered equations into a coherent deriva563skills.sh installs
3alirezarezvani avatarteam-communicationsalirezarezvani/claude-skillsWrite internal company communications — 3P updates (Progress/Plans/Problems), company-wide newsletters, FAQ roundups, incident reports, leadership updates, stat562skills.sh installs
4jezweb avatarwordpress-plugin-corejezweb/claude-skillsBuild secure WordPress plugins with hooks, database interactions, Settings API, custom post types, and REST API. Covers Simple, OOP, and PSR-4 architecture patt560skills.sh installs
5alirezarezvani avatarinternal-narrativealirezarezvani/claude-skillsBuild and maintain one coherent company story across all audiences — employees, investors, customers, candidates, and partners. Detects narrative contradictions558skills.sh installs
6recoupable avatarrecoup-apirecoupable/skillsCall the Recoupable API from the sandbox to fetch artist data, socials, organizations, research, documents and any other platform resource — and to invoke exter550skills.sh installs