So you're saying there are actually three different concepts here, right?
- A "platform" target: a triple you can compile for (
--target
) - An "artifact" target: the output of a build (
/target
) - A "unit" target: a compilation unit (lib, bins, examples, etc;
--all-targets
)
I seem to remember that Cargo also uses the "unit" wording in some of its internals. Would it maybe make sense to rename (3) to unit
while renaming (2) to artifact
? I guess at the rustc level there might be overlap with codegen units, but --all-units
seems like a potentially better alternative then --all-artifacts
especially when used with cargo check
(which doesn't actually produce artifacts).