Open LukeMathWalker opened 1 year ago
I think this would follow on nicely from https://github.com/LukeMathWalker/cargo-chef/pull/169
An earlier version had a "collect_local_packages" that walked down from the workspace_packages collecting all local manifests https://github.com/LukeMathWalker/cargo-chef/commit/585a0f5e8784e2be0dc0c9da0dfb5d4915f703a4
Realised that wasn't necessary for #169, but it could serve as the basis for this
There are no examples of how to use the --bin
for prepare
. Curious to know, are we supposed to use one of the following:
--bin app # raw binary name
--bin target/release/app # the path into the build collateral
--bin services/app # the path into the source code (kind of...)
--bin services/src/app # the path toward main.rs but with app
cargo-chef
slims down the workspace members to just the specified binary whencargo chef prepare
is invoked with a--bin
flag. At the moment (see #207) we still keep around ALL other local manifests, in case the binary depends on another one of the local crates via a path dependency. To maximise cache reuse, we could be more sophisticated: only include in therecipe.json
file the manifests of the local crates that are in the dependency closure of the specified binary target.