A cargo subcommand to display assembly, LLVM-IR, MIR, and WASM generated for Rust code.
cargo-show-asm is a Cargo subcommand that displays the low-level code generated by the Rust compiler, including assembly, LLVM-IR, MIR, and WebAssembly. It helps developers understand how their Rust code translates to machine code, enabling performance optimization and debugging of compilation behavior. The tool addresses the need for visibility into compiler output without the overhead of manual inspection.
Rust developers working on performance-critical applications, compiler enthusiasts, and those needing to debug or optimize generated code. It's particularly useful for systems programmers, embedded developers, and anyone investigating compiler behavior or WebAssembly output.
Developers choose cargo-show-asm because it provides accurate, fast analysis without forcing recompilation, supports multiple output formats and architectures, and offers clean, customizable output. It's a maintained alternative to cargo-asm with better performance and more features.
cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Respects the user's actual build settings and avoids unnecessary recompilation, ensuring output matches the real compilation process as stated in the philosophy section.
Supports assembly (Intel or AT&T syntax), LLVM-IR, MIR, WASM, and llvm-mca analysis, providing comprehensive insights into different compilation stages from the README features list.
Can display Rust source code alongside generated assembly with the '--rust' flag, making it easier to debug and understand the mapping between high-level and low-level code.
Allows analysis of specific functions, crates, binaries, examples, tests, or benchmarks with configurable context depth for call chains, as detailed in the usage examples.
The README explicitly states 'Limited support for Windows', which can hinder developers on that platform and may lead to compatibility issues or missing features.
With numerous options and flags for postprocessing, targeting, and output formats, the tool can be overwhelming for users not familiar with compiler internals or detailed CLI usage.
MIR output relies on rustc's human-readable format, which the README notes is not stable and may change between compiler versions, affecting reliability for long-term projects.