Konubinix' opinionated web of thoughts

Cargo-Chef

Fleeting

5x Faster Rust Docker Builds with cargo-chef | A learning journal

Most programming languages follow the same playbook: you COPY a lock-file of some kind first, build your dependencies, COPY over the rest of your source code and then build your project

https://www.lpalmieri.com/posts/fast-rust-docker-builds/

most of the work is cached as long as your dependency tree does not change between one build and the next.

https://www.lpalmieri.com/posts/fast-rust-docker-builds/

copy the lock file, create a dummy main.rs file, build the project, delete the dummy file, copy over your source code, build again

https://www.lpalmieri.com/posts/fast-rust-docker-builds/

cargo-chef hopefully provides a streamlined workflow to help more people leverage Docker layer caching in their projects.

https://www.lpalmieri.com/posts/fast-rust-docker-builds/