| Crates.io | cargo-disasm |
| lib.rs | cargo-disasm |
| version | 0.6.0 |
| created_at | 2020-11-06 21:38:05.278926+00 |
| updated_at | 2023-06-19 04:06:04.066721+00 |
| description | Disassembly viewer for Rust projects (and more) |
| homepage | https://github.com/ExPixel/cargo-disasm |
| repository | https://github.com/ExPixel/cargo-disasm |
| max_upload_size | |
| id | 309363 |
| size | 172,290 |
A cargo subcommand that displays the assembly generated for a function.
cargo-disasmdoes not require recompiling your project, it disassembles and finds symbols in your binary directly.
This is still under heavy development
For now
cargo-disasmcan disassemble symbols fromELF(Linux),Mach(MacOS), anPE/COFF(Windows) object files for binary crates and make use of DWARF and PDB debug information for symbol discovery. Check here to see the current progress.
cargo install cargo-disasm
To view the assembly of a function foo::bar::baz(), a function baz in module
bar in crate foo, the subcommand can be run from your crate's root directory:
# Make sure that your project has a binary to disassemble first:
cargo build
cargo disasm foo::bar::baz
Sometimes cargo-disasm has trouble finding your symbols in release mode. To make
sure that cargo-disasm is searching all sources available, --symsrc=all can be
passed as an argument like so:
# Make sure that your project has a release binary to disassemble first:
cargo build --release
cargo disasm --release --symsrc=all foo::bar::baz
This solution is temporary and the default
--symsrc=autoshould be able to figure this out on its own soon.
Windows
MacOS
Linux
Line Information
Postponed