Automic VaultAutomic Vault

brew

使用 Homebrew, apk, Nix 安装 cargo-chef

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

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install cargo-chef

local Homebrew formula metadata

Linux

Alpine Linux apk已验证 · 92%
sudo apk add cargo-chef

Alpine Linux edge package indexes · cargo-chef · 来源: dl-cdn.alpinelinux.org

Nix已验证 · 92%
nix profile install nixpkgs#cargo-chef

nixpkgs package indexes · pkgs/by-name/ca/cargo-chef/package.nix · 来源: api.github.com

概览

软件包摘要

Cargo subcommand to speed up Rust Docker builds using Docker layer caching

命令和别名

  • cargo-chef

历史

项目历史与用法

cargo-chef is a Cargo subcommand for making Rust container builds friendlier to Docker layer caching. It analyzes a project into a dependency recipe, builds that recipe in an earlier image layer, and lets later source-code-only changes reuse the expensive dependency build.

项目历史

The project was created by Luca Palmieri in 2020 and its README says it was initially developed for the deployment chapter of Zero to Production in Rust. The upstream repository describes the command as a way to speed up Rust Docker builds using Docker layer caching.

Its design codified a pattern Rust teams were already hand-rolling in Dockerfiles: copy manifests first, build dependencies, then copy application sources. cargo-chef made that approach workspace-aware and less fragile by generating a recipe from Cargo.toml and Cargo.lock inputs.

采用历史

cargo-chef spread through Rust backend and CI workflows because Docker build cache misses are especially painful for projects with large dependency graphs. The project publishes a prebuilt Docker image, and the crate has accumulated millions of crates.io downloads, showing adoption beyond a one-off example tool.

Packaging in Homebrew, apk, and Nix reflects its use by developers who want the subcommand available outside pure cargo-install workflows.

使用方式

A typical workflow runs `cargo chef prepare --recipe-path recipe.json` after copying the source tree in a planner stage, then `cargo chef cook --release --recipe-path recipe.json` in a builder stage before copying the full application code.

The README emphasizes that the tool is mainly intended for container builds, not normal local development, because it writes the project skeleton needed to cache dependencies.

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

For package managers, cargo-chef is interesting because it turns Cargo metadata into a build-cache artifact. It is a small CLI, but it sits directly at the intersection of Cargo workspaces, lockfiles, reproducible images, and CI build economics.

It is also a recognizable Rust ecosystem answer to the `requirements.txt`-style dependency layer used in other language containers.

时间线

  • 2020: GitHub repository created and first crates.io release published.
  • 2020: README documents its origin in Zero to Production in Rust.
  • 2025-2026: Release stream continues through the 0.1.x series, with crates.io showing more than three million downloads by June 2026.

Related projects

  • Cargo is the package manager and build tool that cargo-chef extends.
  • Docker and the official Rust container images are the primary environment targeted by the documented workflow.
  • Zero to Production in Rust is the book project that originally motivated the tool.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 构建元数据列出 1 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
cargo-chefcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本0.1.77
管理器更新时间
本地数据OK
上游当前
检测到的最新版本v0.1.77

https://github.com/LukeMathWalker/cargo-chef

  • 信息No package-manager update timestamp was available.低 置信度

安装元数据

软件包元数据

软件包键brew:cargo-chef
版本0.1.77
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/cargo-chef
主页https://github.com/LukeMathWalker/cargo-chef
仓库https://github.com/LukeMathWalker/cargo-chef
上游文档https://github.com/LukeMathWalker/cargo-chef#readme
许可证Apache-2.0 OR MIT
源码归档https://github.com/LukeMathWalker/cargo-chef/archive/refs/tags/v0.1.77.tar.gz
构建依赖rust
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namecargo-chef
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

cargo-chef

nix profile install nixpkgs#cargo-chef
  • normalized package name match
  • 匹配方式:Cargo Chef
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ca/cargo-chef/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
apk95%

cargo-chef 0.1.77-r0

A cargo sub-command to build project dependencies for optimal Docker layer caching.

https://github.com/LukeMathWalker/cargo-chef

sudo apk add cargo-chef
  • License: MIT OR Apache-2.0
  • Architecture: x86_64
  • Source Package: cargo-chef
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Cargo Chef
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: cargo-chef from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
apk95%

cargo-chef-doc 0.1.77-r0

A cargo sub-command to build project dependencies for optimal Docker layer caching. (documentation)

https://github.com/LukeMathWalker/cargo-chef

sudo apk add cargo-chef-doc
  • License: MIT OR Apache-2.0
  • Architecture: x86_64
  • Source Package: cargo-chef
  • normalized package name match
  • 匹配方式:Cargo Chef
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: cargo-chef-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

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