-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsA-cross-compilingArea: using --target flag for other platformsArea: using --target flag for other platformsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Description
Describe the problem you are trying to solve
I have a project with two crates in a workspace. The first crate should compile to asmjs with --target asmjs-unknown-emscripten
and the result is used in the second crate, which should compile to the native binary format (default target).
When I run cargo build
in the root crate that contains the workspace configuration in Cargo.toml
, it builds both crates using the default target.
Describe the solution you'd like
I'd like to be able to specify the target for each crate. I'm not sure if this belongs in each crates' Cargo.toml
or in the root crate's Cargo.toml
.
j16r, rumblefrog, azasypkin, HayleyDeckers, xfoxfu and 64 morewhizsid, lf-, eigenform, Type1J, ahlinc and 5 moreType1J, ahlinc, bobbbay, kenseii and wiktorwieclaw
Metadata
Metadata
Assignees
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsA-cross-compilingArea: using --target flag for other platformsArea: using --target flag for other platformsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`