{"repo":"LukeMathWalker/cargo-chef","free":true,"listed":false,"github":"https://github.com/LukeMathWalker/cargo-chef","clone":"git clone https://github.com/LukeMathWalker/cargo-chef.git","description":"A cargo-subcommand to speed up Rust Docker builds using Docker layer caching.","language":"Rust","stars":2685,"topics":["rust","docker","cargo","ci"],"license":"Apache-2.0","category":"deployment-docker-iac","readme_excerpt":"cargo-chef Cache the dependencies of your Rust project and speed up your Docker builds. cargo-chef was initially developed for the deployment chapter of Zero to Production In Rust, a hands-on introduction to backend development using the Rust programming language. Table of Contents 0. How to install 1. How to use 2. Benefits vs Limitations 3. License How To Install You can install cargo-chef from crates.io with How to use :warning: cargo-chef is not meant to be run locally Its primary use-case is to speed up container builds by running BEFORE the actual source code is copied over. Don't run it on existing codebases to avoid having files being overwritten. cargo-chef exposes two commands: prepare and cook : prepare examines your project and builds a recipe that captures the set of information required to build your dependencies. Nothing too mysterious going on here, you can examine the recipe.json file: it contains the skeleton of your project (e.g. all the Cargo.toml files with their relative path, the Cargo.lock file is available) plus a few additional pieces of information. In particular it makes sure that all libraries and binaries are explicitly declared in their respective Cargo.toml files even if they can be found at the canonical default location ( src/main.rs for a binary, src/lib.rs for a library). The recipe.json is the equivalent of the Python requirements.txt file - it is the only input required for cargo chef cook , the command that will build out our dependencie","default_branch":null,"files":null,"tree":[],"storefront":"/r/LukeMathWalker","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/LukeMathWalker/cargo-chef/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}