# 使用 Homebrew, Nix 安装 cargo-docset

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cargo-docset
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

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

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

## 软件包事实

- **软件包键:** brew:cargo-docset
- **软件包管理器:** Homebrew
- **版本:** 0.3.1
- **来源摘要:** Cargo subcommand to generate a Dash/Zeal docset for your Rust packages
- **主页:** <https://github.com/Robzz/cargo-docset>
- **仓库:** <https://github.com/Robzz/cargo-docset>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cargo-docset (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

cargo-docset is a Cargo subcommand that converts rustdoc output for a crate or workspace into a Dash- and Zeal-compatible docset. It serves developers who want offline, indexed Rust API documentation inside docset browsers.

### 项目历史

The GitHub repository was created in August 2019, and the crate was published on crates.io the same month. The README defines the tool around generating Dash/Zeal docsets for Rust packages and their dependencies.

Rather than parsing Rust items directly, cargo-docset runs Cargo to generate documentation, walks the generated documentation directory, and fills a SQLite database in the docset format. That implementation choice keeps the project small and aligned with rustdoc output.

### 采用历史

Adoption appears specialized: the supplied package-manager facts list Homebrew and Nix packages, and crates.io shows modest lifetime downloads. It fits a narrower offline-documentation workflow than general Cargo dependency or build tooling.

### 使用方式

Users run `cargo docset` in a crate directory. By default the generated docset is placed in `target/docset`, then copied into the Dash or Zeal docset directory.

The command supports many `cargo doc`-style options, including feature flags, package selection, target selection, workspace generation, and private item documentation.

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

cargo-docset is interesting because it bridges Rust's native rustdoc output with the older Dash/Zeal docset ecosystem. It shows how package metadata, generated HTML, and SQLite indexes can be stitched together without inventing a new documentation browser.

For maintainers who work offline or across many local crates, it packages a workspace's documentation into a format that external developer tools already understand.

### 时间线

- 2019: Robzz/cargo-docset GitHub repository created.
- 2019: cargo-docset crate first published on crates.io.
- 2022: crates.io metadata shows the 0.3.1 release as the current line.

### Related projects

- rustdoc and `cargo doc` generate the HTML documentation that cargo-docset packages.
- Dash and Zeal are the docset browsers targeted by the generated output.
- SQLite is used by the Dash docset format for indexing.

### 来源

- <https://api.github.com/repos/Robzz/cargo-docset>
- <https://crates.io/api/v1/crates/cargo-docset>
- <https://github.com/Robzz/cargo-docset#readme>
- <https://raw.githubusercontent.com/Robzz/cargo-docset/master/README.md>
- input.source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Nix - cargo-docset: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-docset/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/cargo-docset.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cargo-docset.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
