搜索

PythonReactSEOPDF
GitHub Skill

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.

onbjerg☆ 4 仓库 Stars1 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

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 --rust to understand which source lines map to which instructions
  • Look for vmov, vpadd, etc. to verify SIMD vectorization
  • Missing function? Try --lib or check if it was inlined

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-03-03
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!