{"id":13478600,"url":"https://github.com/gnzlbg/cargo-asm","last_synced_at":"2025-05-14T22:07:20.126Z","repository":{"id":39636363,"uuid":"121427492","full_name":"gnzlbg/cargo-asm","owner":"gnzlbg","description":"cargo subcommand showing the assembly or llvm-ir generated for Rust code","archived":false,"fork":false,"pushed_at":"2024-02-26T19:01:08.000Z","size":367,"stargazers_count":1220,"open_issues_count":56,"forks_count":37,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-13T18:44:34.442Z","etag":null,"topics":["cargo-subcommand"],"latest_commit_sha":null,"homepage":"https://github.com/gnzlbg/cargo-asm","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnzlbg.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license-apache.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-13T19:38:49.000Z","updated_at":"2025-04-08T11:47:42.000Z","dependencies_parsed_at":"2025-01-31T06:37:45.765Z","dependency_job_id":null,"html_url":"https://github.com/gnzlbg/cargo-asm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnzlbg%2Fcargo-asm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnzlbg%2Fcargo-asm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnzlbg%2Fcargo-asm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnzlbg%2Fcargo-asm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnzlbg","download_url":"https://codeload.github.com/gnzlbg/cargo-asm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235695,"owners_count":22036963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cargo-subcommand"],"created_at":"2024-07-31T16:01:59.231Z","updated_at":"2025-05-14T22:07:15.101Z","avatar_url":"https://github.com/gnzlbg.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# cargo-asm\n\n[![crates.io version][crate-shield]][crate] [![Travis build status][travis-shield]][travis] [![Appveyor build status][appveyor-shield]][appveyor] [![License][license-shield]][license]\n\n\n\u003e A [`cargo`] subcommand that displays the assembly or llvm-ir generated for Rust source code.\n\n# Install\n\n```\ncargo install cargo-asm\n```\n\n# Example \n\nTo view the assembly of the function `double_n` in the module `bar` of the crate\n[`lib_crate`] annotated with its corresponding Rust code, go to the crate's root\ndirectory \n\n```\ngit clone git@github.com:gnzlbg/cargo-asm.git\ncd cargo-asm/cargo-asm-test/lib_crate\n```\n\nand type:\n\n```\ncargo asm lib_crate::bar::double_n --rust\n```\n\nwhich outputs:\n\n\n![screenshot](https://raw.githubusercontent.com/gnzlbg/cargo-asm/images/screenshot.png)\n\n(note: the source-code mapping information emitted by rustc after optimizations is\nsometimes far from perfect, like in this case. Take it with a grain of salt.)\n\n\nTo view the LLVM IR type\n\n```\ncargo llvm-ir lib_crate::bar::double_n\n```\n\n#  Features\n\n* Platform support:\n\n  * OS: Linux, Windows, and MacOSX. \n  * Rust: nightly and stable.\n  * Architectures: x86, x86_64, arm, aarch64, powerpc, mips, sparc.\n\n* Displaying:\n\n  * Assembly in Intel or AT\u0026T syntax.\n  * Corresponding Rust source code alongside assembly.\n  * JSON AST for further processing.\n  * LLVM-IR.\n\n* Querying:\n\n  * functions, for example: `foo`:\n  \n  ```\n  cargo asm crate::path::to::foo\n  ```\n  \n  * inherent method, for example: `foo` of a type `Foo` (that is, `Foo::foo`):\n  \n  ```\n  cargo asm crate::path::to::Foo::foo\n  ```\n  \n  * trait method implementations, for example: `bar` of the trait `Bar` for the type `Foo`:\n  \n  ```\n  cargo asm \"\u003ccrate::path::to::Foo as crate::path::to::Bar\u003e::bar\"\n  ```\n\n  * generic functions, methods, ...\n  \nTo search for a function named `foo` in some path, one can just type `cargo asm\nfoo`. The command will return a list of all similarly named functions\nindependently of the path.\n\n# License\nThis project is licensed under either of\n\n* Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)\n\nat your option.\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this project by you, as defined in the Apache-2.0 license,\nshall be dual licensed as above, without any additional terms or conditions.\n\n[`cargo`]: https://crates.io/\n\n[travis-shield]: https://img.shields.io/travis/gnzlbg/cargo-asm.svg?style=flat-square\n[travis]: https://travis-ci.org/gnzlbg/cargo-asm\n[appveyor-shield]: https://img.shields.io/appveyor/ci/gnzlbg/cargo-asm.svg?style=flat-square\n[appveyor]: https://ci.appveyor.com/project/gnzlbg/cargo-asm/branch/master\n[license-shield]: https://img.shields.io/badge/License-MIT%2FApache2.0-green.svg?style=flat-square\n[license]: https://github.com/gnzlbg/cargo-asm/blob/master/license.md\n[crate-shield]: https://img.shields.io/crates/v/cargo-asm.svg?style=flat-square\n[crate]: https://crates.io/crates/cargo-asm\n[`lib_crate`]: https://github.com/gnzlbg/cargo-asm/tree/master/cargo-asm-test/lib_crate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnzlbg%2Fcargo-asm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnzlbg%2Fcargo-asm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnzlbg%2Fcargo-asm/lists"}