# 使用 Homebrew, apk, Nix, pacman 安装 cargo-geiger

查看 cargo-geiger 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:cargo-geiger
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cargo-geiger
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add cargo-geiger
```

  证据: Alpine Linux edge package indexes: cargo-geiger from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#cargo-geiger
```

  证据: nixpkgs package indexes: pkgs/by-name/ca/cargo-geiger/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S cargo-geiger
```

  证据: Arch Linux sync databases: cargo-geiger from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:cargo-geiger
- **软件包管理器:** Homebrew
- **版本:** 0.13.0
- **来源摘要:** Detects usage of unsafe Rust in a Rust crate and its dependencies
- **主页:** <https://github.com/geiger-rs/cargo-geiger>
- **仓库:** <https://github.com/geiger-rs/cargo-geiger>
- **最后更新:** 2026-06-22T14:02:57-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cargo-geiger (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.13.0
## 项目历史与用法

cargo-geiger is a Cargo subcommand that reports unsafe Rust usage in a crate and its dependency graph. Its name references a Geiger counter: unsafe code is treated as something worth detecting, measuring, and containing.

The project is intentionally framed as audit input, not an automatic security verdict. Its README warns that unsafe usage is nuanced and that reports should be handled carefully.

### 项目历史

The cargo-geiger repository and crate were created in June 2018. The README says the tool was originally based on code from cargo-osha and cargo-tree, combining unsafe-code scanning with dependency-tree traversal.

Over time the project split reusable pieces into library crates, including `geiger` and `cargo-geiger-serde`. The changelog records substantial dependency-graph work in 0.11.0 using cargo_metadata and JSON/report serialization improvements.

### 采用历史

cargo-geiger found a niche in Rust security review and supply-chain auditing, especially among developers interested in minimizing or documenting unsafe code in dependencies.

The README points users toward cargo-crev and safety-dance as audit contexts where cargo-geiger statistics can help. That positioning kept it from becoming a simplistic 'unsafe equals bad' badge while still making unsafe usage visible.

### 使用方式

Usage is intentionally simple: run `cargo geiger` from the directory containing the `Cargo.toml` to analyze. The tool reports unsafe-code statistics for the crate and dependencies.

The README documents installation with `cargo install --locked cargo-geiger`, an optional vendored OpenSSL build, and prebuilt GitHub releases.

### 为什么软件包爱好者会关心

cargo-geiger is package-nerd significant because it made unsafe-code exposure a transitive package property that could be inspected like licenses, advisories, or dependency trees.

It also shows Rust's audit culture maturing: package metadata alone is not enough, so tools emerged to summarize source-level risk signals across the dependency graph.

### 时间线

- 2018-06-20: GitHub repository created and cargo-geiger 0.1.0 published to crates.io.
- 2018-2019: Project builds on cargo-osha and cargo-tree ideas to scan crates and dependencies for unsafe usage.
- 2020: 0.11.0 changelog records dependency-graph exploration through cargo_metadata and adds JSON/report serialization pieces.
- 2026: Project remains active under geiger-rs with more than 190,000 crates.io downloads.

### Related projects

- cargo-osha and cargo-tree are named by the README as original sources of code or ideas.
- cargo-crev and safety-dance are named as audit workflows where cargo-geiger output can provide statistical input.
- cargo_metadata became important to cargo-geiger's dependency-graph handling, according to the changelog.

### 来源

- <https://api.github.com/repos/geiger-rs/cargo-geiger>
- <https://crates.io/crates/cargo-geiger>
- <https://github.com/geiger-rs/cargo-geiger#readme>
- <https://github.com/geiger-rs/cargo-geiger/blob/master/CHANGELOG.md>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - cargo-geiger: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-geiger/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - cargo-geiger - 0.13.0-r0: normalized package name match | Alpine Linux edge package indexes: cargo-geiger from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Detects usage of unsafe Rust in a Rust crate and its dependencies. | https://github.com/geiger-rs/cargo-geiger
- apk - cargo-geiger-doc - 0.13.0-r0: normalized package name match | Alpine Linux edge package indexes: cargo-geiger-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Detects usage of unsafe Rust in a Rust crate and its dependencies. (documentation) | https://github.com/geiger-rs/cargo-geiger
- pacman - cargo-geiger - 0.13.0-1: normalized package name match | Arch Linux sync databases: cargo-geiger from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Detects usage of unsafe Rust in a Rust crate and its dependencies | https://github.com/rust-secure-code/cargo-geiger


## Combined YAML source

View the package source record on GitHub. [combined/cargo-geiger.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cargo-geiger.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
