# Installer cargo-chef avec Homebrew, apk, Nix

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de cargo-chef pour les workflows d'agents IA.

## installation

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

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

```sh
brew install cargo-chef
```

  Preuve: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add cargo-chef
```

  Preuve: Alpine Linux edge package indexes: cargo-chef from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

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

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

## Faits du paquet

- **Clé du paquet:** brew:cargo-chef
- **Gestionnaire de paquets:** Homebrew
- **Page du gestionnaire de paquets:** <https://formulae.brew.sh/formula/cargo-chef>
- **Version:** 0.1.77
- **Résumé source:** Cargo subcommand to speed up Rust Docker builds using Docker layer caching
- **Page d'accueil:** <https://github.com/LukeMathWalker/cargo-chef>
- **Dépôt:** <https://github.com/LukeMathWalker/cargo-chef>
- **Licence:** Apache-2.0 OR MIT
- **Archive source:** <https://github.com/LukeMathWalker/cargo-chef/archive/refs/tags/v0.1.77.tar.gz>
- **Généré:** 2026-08-04T22:13:35+00:00

## exécutables

- cargo-chef (cli)
- cargo-chef (alias)

## Dépendances de compilation

- rust

## Comportement d'installation

- hook post-installation: non défini
- Bouteille: disponible sur arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Version et fraîcheur

- page générée: 2026-08-04
- version du gestionnaire: 0.1.77
- données locales: OK
- dépôt amont: https://github.com/LukeMathWalker/cargo-chef
- dernière version détectée: v0.1.77 (à jour)
- info: No package-manager update timestamp was available.
## Historique du projet et usages

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.

### Historique du projet

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.

### Historique d'adoption

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.

### Modes d'utilisation

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.

### Pourquoi les passionnés de paquets s'y intéressent

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.

### Chronologie

- 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.

### Sources

- <https://api.github.com/repos/LukeMathWalker/cargo-chef>
- <https://crates.io/api/v1/crates/cargo-chef>
- <https://github.com/LukeMathWalker/cargo-chef#readme>


## Notes de sécurité

narrow executable package without higher-risk signals.

- **Risque Geiger:** vert / faible
- narrow executable package without higher-risk signals

## Détails de la base source

- **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:** stable

## Autres enregistrements de gestionnaires de paquets

- Nix - cargo-chef: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-chef/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - cargo-chef - 0.1.77-r0: normalized package name match | Alpine Linux edge package indexes: cargo-chef from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A cargo sub-command to build project dependencies for optimal Docker layer caching. | https://github.com/LukeMathWalker/cargo-chef
- apk - cargo-chef-doc - 0.1.77-r0: normalized package name match | Alpine Linux edge package indexes: cargo-chef-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A cargo sub-command to build project dependencies for optimal Docker layer caching. (documentation) | https://github.com/LukeMathWalker/cargo-chef


## Liens liés

- [Cloud CLI packages](https://pkg.so/fr/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://pkg.so/fr/source-control-tools/) - Belongs to a source-control command family.
- [Package publisher tools](https://pkg.so/fr/package-publishers/) - Belongs to a package publishing or registry command family.
- [Terminal utility packages](https://pkg.so/fr/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [rust](https://pkg.so/fr/brew/rust/) - Build dependency declared by Homebrew.
- [cargo-edit](https://pkg.so/fr/brew/cargo-edit/) - Shares pkgdb curated category or tags: cargo, cli, dependencies, developer-tools, rust.
- [cargo-outdated](https://pkg.so/fr/brew/cargo-outdated/) - Shares pkgdb curated category or tags: cargo, cli, dependencies, developer-tools, rust.
- [cargo-binstall](https://pkg.so/fr/brew/cargo-binstall/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-c](https://pkg.so/fr/brew/cargo-c/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-nextest](https://pkg.so/fr/brew/cargo-nextest/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-update](https://pkg.so/fr/brew/cargo-update/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-sweep](https://pkg.so/fr/brew/cargo-sweep/) - Shares pkgdb curated category or tags: build-cache, cli, developer-tools, rust.
- [cargo-llvm-cov](https://pkg.so/fr/brew/cargo-llvm-cov/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-chef](https://pkg.so/fr/cargo/cargo-chef/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

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


## Sources

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