Open
Description
Checklist
- I've looked through the issues and pull requests for similar request
- This feature could be solved with a custom docker image (optional)
Describe your request
When I configure multiple targets, such as with Cargo.toml, then I expect a convenient way to loop over them automatically in succession.
Instead, cargo build
defaults to the host as a target.
Ideally, cargo build
would automatically iterate over all configured targets.
If for some reason this is not to be done automatically, then I would love to see a CLI flag to have cross
loop over the targets.
Describe why this would be a good inclusion for cross
Some users are reporting shell based looping. This has several problems:
- Violates the Don't Repeat Yourself (DRY) principle
- Adds risk
- Shell coding is a fragile practice
- Departs from the Rust ecosystem
- Breaks builds in classic, many COMSPEC Windows environments
- Encourages users to parse Cargo.toml, assuming a schema that may break in the future
For these reasons, and general UX, I would love for cross itself to implement target iteration.
Doesn't have to be parallel building, either. Could be a simple Rust for loop.