cargo-geiger ☢️

Build Status unsafe forbidden

A program that list statistics related to usage of unsafe Rust code in a Rust crate and all its dependencies.

This cargo plugin is based on the code from two other projects: https://github.com/icefoxen/cargo-osha and https://github.com/sfackler/cargo-tree.

Usage

  1. cargo install cargo-geiger
  2. Navigate to the same directory as the Cargo.toml you want to analyze.
  3. cargo geiger

Output example

Example output

Why even care about unsafe Rust usage?

When and why to use unsafe Rust is out of scope for this project, it is simply a tool that provides information to aid auditing and hopefully to guide dependency selection. It is however the opinion of the author of this project that libraries choosing to abstain from unsafe Rust usage when possible should be promoted.

This project is an attempt to create pressure against unnecessary usage of unsafe Rust in public Rust libraries.

Why the name?

https://en.wikipedia.org/wiki/Geiger_counter

Unsafe code and ionizing radiation have something in common, they are both inevitable in some situations and both should preferably be safely contained!

Known issues

Roadmap

Changelog

0.8.0

0.7.3

0.7.2

0.7.1

0.7.0

0.6.1

0.6.0

0.5.0

0.4.2

0.4.1

0.4.0

0.3.1

0.3.0

0.2.0

0.1.x