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

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

## 安装

```sh
sudo av install brew:cargo-run-bin
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cargo-run-bin
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add cargo-run-bin
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#cargo-run-bin
```

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

- pacman (92%):

```sh
sudo pacman -S cargo-run-bin
```

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

## 软件包事实

- **软件包键:** brew:cargo-run-bin
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/cargo-run-bin>
- **版本:** 1.7.4
- **来源摘要:** Build, cache, and run binaries from Cargo.toml to avoid global installs
- **主页:** <https://dustinblackman.com/posts/why-does-everyone-install-crates-globally/>
- **仓库:** <https://github.com/dustinblackman/cargo-run-bin>
- **上游文档:** <https://github.com/dustinblackman/cargo-run-bin#readme>
- **许可证:** MIT
- **源码归档:** <https://github.com/dustinblackman/cargo-run-bin/archive/refs/tags/v1.7.4.tar.gz>
- **最后更新:** 2026-06-15T10:20:11-04:00
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- cargo-bin (cli)
- cargo-bin (别名)

## 构建依赖

- rust

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.7.4
- 管理器更新时间: 2026-06-15
- 本地数据: OK
- 上游仓库: https://github.com/dustinblackman/cargo-run-bin
- 检测到的最新版本: v1.7.4 (当前)
## 项目历史与用法

cargo-run-bin is a Cargo-oriented tool for building, caching, and running project-scoped CLI binaries declared in Cargo.toml instead of installing those tools globally.

### 项目历史

The GitHub repository was created in May 2021 and the first crates.io release followed later that month. The README positions the tool as similar to npm run and gomodrun, aimed at preventing team and CI tool-version drift.

### 采用历史

crates.io metadata lists it as a Cargo plugin and command-line utility. Batch package facts show packaging across Homebrew, Alpine, Nix, and Arch, and the README also documents distro-package installation paths.

### 使用方式

Users declare tools under [package.metadata.bin] or [workspace.metadata.bin] in Cargo.toml, then run cargo bin CRATE to install/cache and execute the requested binary. The README also documents cargo bin --install and cargo bin --sync-aliases for Cargo-extension aliases.

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

It gives Rust projects a lightweight, Cargo-native answer to pinned developer tooling: tool versions live with the project manifest, which makes onboarding and CI behavior less dependent on whatever happens to be globally installed.

### 时间线

- 2021: Repository created and first crates.io release published.
- 2024: v1.7.x releases documented on GitHub.
- 2026: crates.io reported v1.7.5 as the latest release.

### Related projects

- README compares the workflow to npm run and gomodrun.
- README says cargo-binstall can be used for prebuilt binary installs when available.

### 来源

- <https://api.github.com/repos/dustinblackman/cargo-run-bin>
- <https://github.com/dustinblackman/cargo-run-bin>
- <https://github.com/dustinblackman/cargo-run-bin#readme>
- <https://crates.io/api/v1/crates/cargo-run-bin>
- <https://formulae.brew.sh/api/formula/cargo-run-bin.json>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: Cargo.toml
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cargo-run-bin
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Nix - cargo-run-bin: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-run-bin/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - cargo-run-bin - 1.7.2-r0: normalized package name match | Alpine Linux edge package indexes: cargo-run-bin from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Build, cache, and run CLI tools scoped in Cargo.toml | https://github.com/dustinblackman/cargo-run-bin
- apk - cargo-run-bin-doc - 1.7.2-r0: normalized package name match | Alpine Linux edge package indexes: cargo-run-bin-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Build, cache, and run CLI tools scoped in Cargo.toml (documentation) | https://github.com/dustinblackman/cargo-run-bin
- pacman - cargo-run-bin - 1.7.4-2: normalized package name match | Arch Linux sync databases: cargo-run-bin from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Build, cache, and run CLI tools scoped in Cargo.toml | https://github.com/dustinblackman/cargo-run-bin


## 相关链接

- [Package publisher tools](https://www.automicvault.com/zh-hans/pkg/package-publishers/) - Belongs to a package publishing or registry command family.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Package ecosystem packages](https://www.automicvault.com/zh-hans/pkg/package-ecosystem-tools/) - Matched package manager, installer, dependency, registry, or publishing metadata.
- [rust](https://www.automicvault.com/zh-hans/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [cargo-chef](https://www.automicvault.com/zh-hans/pkg/brew/cargo-chef/) - Package names and metadata indicate a similar tool family. Shared terms: build, cache, cargo.
- [cargo-shear](https://www.automicvault.com/zh-hans/pkg/brew/cargo-shear/) - Package names and metadata indicate a similar tool family. Shared terms: cargo, cargo-toml, toml.
- [cargo-sort](https://www.automicvault.com/zh-hans/pkg/brew/cargo-sort/) - Package names and metadata indicate a similar tool family. Shared terms: cargo, cargo-toml, toml.

## Combined YAML source

View the package source record on GitHub. [combined/cargo-run-bin.yml](https://github.com/automic-vault/db/blob/main/combined/cargo-run-bin.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
