feat: use cargo hakari to reduce crate rebuilds
Large workspaces end up with a very large number of possible build configurations. Even worse, the feature set of a package affects everything that depends on it, so syn being built with a slightly different feature set than before would cause *every package that directly or transitively depends on syn to be rebuilt. For large workspaces, this can result a lot of wasted build time. To avoid this problem, many large workspaces contain a workspace-hack crate. The purpose of this package is to ensure that dependencies like syn are always built with the same feature set no matter which workspace packages are currently being built. This is done by: 1) adding dependencies like syn to workspace-hack with the full feature set required by any package in the workspace 2) adding workspace-hack as a dependency of every crate in the repository. cargo-hakari manages a workspace-hack crate for you.
This commit is contained in:
parent
c28ef728b5
commit
88520e6858
2 changed files with 2 additions and 0 deletions
|
|
@ -8,4 +8,5 @@ edition = "2018"
|
|||
crate-type = [ "dylib" ]
|
||||
|
||||
[dependencies]
|
||||
cargo-workspace-hack = { version = "0.1", path = "../../../../../infra/cargo-workspace-hack" }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue