You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workspace with Multiple interdependent crates #314
We have a workspace that has a few crates we use as libraries. I.e, a layout like so:
library1/lib.rs
library2/lib.rs <-- depends on library1
binary/main.rs <-- depends on library1 & library2
With cargo chef cook & prepare, both the libraries and binary are all skeleton files, so we can never cache library1 & library2, they are built each time.
One possible solution is to layer it, so we run cargo chef cook a couple of times to build up the cache layers. However, we'd need an option to ensure that cargo chef does not create/overwrite skeleton files for certain crates within the workspace.
I.e, you could imagine:
prepare
copy over the recipe.json
copy over justlibrary1
cook, but exclude skeletons for library1
copy over library2
cook, but exclude skeletons for library1 & library2
full build
Reacted by Chris Nobody, Gibran, Mahesh Bandara Wijerathna and Ludwig Schlame
Activity