LukeMathWalker / cargo-chef

A cargo-subcommand to speed up Rust Docker builds using Docker layer caching.
Apache License 2.0
1.72k stars 113 forks source link

How to optimise wasm crate in a workspace? #228

Open antonoal opened 1 year ago

antonoal commented 1 year ago

Hi

I've got a project with two crates - server and frontend (wasm). My docker file does this:

RUN cd frontend && trunk build --release RUN cargo build --release

When I changed the file to use cargo chef I can see the effect when the server side is being built (the later RUN) but not the frontend. The first RUN still recompiles all its dependencies.

Do you have ideas how I can cache the dependencies for trunk build as well?

Thanks, Ales