A [
cargo] subcommand that displays the generated assembly generated from Rust source code.
cargo install cargo-asm
To view the assembly of the function double_n in the module bar of the crate
[lib_crate] annotated with its corresponding Rust code, go to the crate's root
directory
git clone git@github.com:gnzlbg/cargo-asm.git
cd cargo-asm/cargo-asm-test/lib_crate
and type:
cargo asm lib_crate::bar::double_n --rust
which outputs:

Platform support:
Displaying:
Querying:
foo:
cargo asm crate::path::to::foo
foo of a type Foo (that is, Foo::foo):
cargo asm crate::path::to::Foo::foo
bar of the trait Bar for the type Foo:
cargo asm "<crate::path::to::Foo as crate::path::to::Bar>::bar"
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.