工作区中箱子的条件构建

问题描述 投票:0回答:0

在这里。假设我有工作区

bar-win-x86-x64_nightly v0.1.0 
└── rand v0.8.5
    ├── rand_chacha v0.3.1
    │   ├── ppv-lite86 v0.2.17
    │   └── rand_core v0.6.4
    │       └── getrandom v0.2.9
    │           └── cfg-if v1.0.0
    └── rand_core v0.6.4 (*)

baz-win-x86 v0.1.0
├── bar-win-x86-x64_nightly v0.1.0 (*)
└── rand v0.8.5 (*)

foo-xxx v0.1.0

qux-win-x64 v0.1.0
├── bar-win-x86-x64_nightly v0.1.0 (*)
└── foo-xxx v0.1.0

wasm-unknw v0.1.0
└── foo-xxx v0.1.0

我想得到:

cargo build --target="i686-pc-windows-msvc"

foo-xxx(稳定)+ baz-win-x86(稳定)+ bar-win-x86-x64_nightly(每晚) 没有别的。 stable crate 有可能依赖 nightly one 吗?

cargo build --target="wasm32-unknown-unknown"

foo-xxx(稳定)+ wasm-unknw(稳定) 没有别的

cargo build --target="x86_64-apple-darwin"

foo-xxx(稳定)

我该怎么办?我试过

.cargo/config.toml and rust-toolchain.toml
没有成功。看起来 cargo 忽略了工作区中 crates 的规则。

rust-cargo
© www.soinside.com 2019 - 2024. All rights reserved.