Patch crates.io dependencies of a workspace while pointing to crates in another workspace
⚓ Rust 📅 2025-07-28 👤 surdeus 👁️ 12Hi,
I have a workspace (lets call it app) where I use some crates.io dependencies, which are part of a separate monorepo workspace and release from there (lets call it root).
app defines a production profile where it applies certain optimizations. Same happens for root. When building a member from app without the patches for its dependencies, pointing to root members, with the production profile, the final artifact has a certain size, but if building the same member from app with the patched workspace dependencies, the build artifact is significantly larger.
I want to specify to cargo to compile the patched dependencies with the profile from the root repo, but I am not sure how to do it, or if it is possible. Based on my current experiments and search I am inclined to say there is no support.
Has anyone stumbled upon this?
2 posts - 2 participants
🏷️ Rust_feed