cargo-asm
Inspects generated assembly for Rust functions using cargo-asm. Use when analyzing low-level codegen, verifying SIMD/vectorization, or debugging performance at the instruction level.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
cargo-asm
Displays the generated assembly for specific Rust functions.
Usage
cargo asm [OPTIONS] <PATH>
Where <PATH> is a function path like crate::module::function or a partial match.
Common Workflows
View assembly for a function
cargo asm my_crate::hot_loop
List all available symbols
cargo asm --lib
Show with source interleaved
cargo asm --rust my_crate::function
Check specific target features
RUSTFLAGS="-C target-cpu=native" cargo asm my_crate::simd_fn
Key Options
-
--rust- Interleave Rust source with assembly -
--lib- Analyze library target (vs binary) -
--bin <NAME>- Analyze specific binary -
--release- Use release profile (default) -
--dev- Use dev profile -
--target <TRIPLE>- Cross-compile target
Tips
- Always use
--release(or it's on by default) to see optimized output - Use
--rustto understand which source lines map to which instructions - Look for
vmov,vpadd, etc. to verify SIMD vectorization - Missing function? Try
--libor check if it was inlined
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-03-03
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!