Cargo-Geiger
Summary
cargo-geiger is a Rust cargo plugin that lists statistics about unsafe code usage in a crate and its dependencies, providing input for auditing.
View Cached Full Text
Cached at: 06/20/26, 05:16 PM
geiger-rs/cargo-geiger
Source: https://github.com/geiger-rs/cargo-geiger
cargo-geiger ☢️
A tool that lists statistics related to the usage of unsafe Rust code in a Rust crate and all its dependencies.
This cargo plugin was originally based on the code from two other projects:
Installation
Try to find and use a system-wide installed OpenSSL library:
cargo install --locked cargo-geiger
Or, build and statically link OpenSSL as part of the cargo-geiger executable:
cargo install --locked cargo-geiger --features vendored-openssl
Alternatively pre-built binary releases are available from GitHub releases.
Usage
- Navigate to the same directory as the
Cargo.tomlyou want to analyze. cargo geiger
Intended Use
This tool is not meant to advise directly whether the code ultimately is truly insecure or not.
The purpose of cargo-geiger is to provide statistical input to auditing e.g. with:
The use of unsafe is nuanced and necessary in some cases and any motivation to use it is outside the scope of cargo-geiger.
It is important that any reporting is handled with care:
- Reddit: The Stigma around Unsafe
- YouTube: Rust NYC: Jon Gjengset - Demystifying unsafe code
- Rust-lang: WG Unsafe Code Guidelines
Output example

Known issues
- See the issue tracker.
Libraries
Cargo Geiger exposes three libraries:
cargo-geiger- Unversioned and highly unstable library exposing the internals of thecargo-geigerbinary. As such, any function contained within this library may be subject to change.cargo-geiger-serde- A library containing the serializable report typesgeiger- A library containing a few decoupled cargo components used by cargo-geiger
Changelog
See the changelog.
Why the name?
https://en.wikipedia.org/wiki/Geiger_counter
Unsafe code, like ionizing radiation, is unavoidable in some situations and should be safely contained!
Similar Articles
cargo-crap: Finding Untested Complexity in AI-Generated Rust Code
cargo-crap is a Rust tool that uses the CRAP metric to identify functions that are both complex and poorly tested, helping developers manage risk in AI-generated code.
Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI
Cargo-nextest is a next-generation test runner for Rust that offers up to 3x faster test execution, per-test isolation, and first-class CI support.
crates.io: development update
The latest crates.io development update introduces a source code viewer for auditing dependencies, begins the process of decoupling accounts from GitHub with native usernames, and adds prominent warnings for unmaintained crates flagged by RustSec.
A Vision for Cargo
A blog post presenting a vision for improving Cargo, covering workflows like dependency management, build performance, adaptability, and maintenance, and inviting community input.
Making Rust supply chain attacks harder with Cackle (2023)
David Lattimore introduces Cackle, a tool that helps prevent supply chain attacks in Rust by using access control lists (ACLs) to restrict what dependencies can do, reducing the risk of malicious code being introduced via third-party crates.