macOS
brew install cargo-cheflocal Homebrew formula metadata
brew
Cargo subcommand to speed up Rust Docker builds using Docker layer caching. Version 0.1.77 via Homebrew; verified from local package data.
install
brew install cargo-cheflocal Homebrew formula metadata
sudo apk add cargo-chefAlpine Linux edge package indexes · cargo-chef · source: dl-cdn.alpinelinux.org
nix profile install nixpkgs#cargo-chefnixpkgs package indexes · pkgs/by-name/ca/cargo-chef/package.nix · source: api.github.com
overview
Cargo subcommand to speed up Rust Docker builds using Docker layer caching
history
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.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
cargo-chef | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/LukeMathWalker/cargo-chef
install metadata
| Package key | brew:cargo-chef |
|---|---|
| Version | 0.1.77 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/cargo-chef |
| Homepage | https://github.com/LukeMathWalker/cargo-chef |
| Repository | https://github.com/LukeMathWalker/cargo-chef |
| Upstream docs | https://github.com/LukeMathWalker/cargo-chef#readme |
| License | Apache-2.0 OR MIT |
| Source archive | https://github.com/LukeMathWalker/cargo-chef/archive/refs/tags/v0.1.77.tar.gz |
| Build dependencies | rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | cargo-chef |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
cargo-chef
nix profile install nixpkgs#cargo-chefcargo-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-chefcargo-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-docsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.