Renaming Cargo "target"

The main concerns we had in the Cargo team when we discussed this were

  • An "artifact" can actually have multiple artifacts, one per crate-type.
    • Not as many users are likely to come in contact with this level of ambiguity as the current "target" ambiguity
  • Not all "artifacts" have artifacts (ie copied out of intermediate locations into final locations, e.g. tests)
    • Likely close enough for now and we can always evolve things to allow more artifacts to be produced
    • You could twist things around to say that the test results are the artifact.

Other things we considered

  • cargo check --all-artifacts: this isn't saying to produce artifacts from cargo check but that we are only checking, and not building, the artifacts
  • Our use of "build target" is derived from make and the proper terms there are "target" (binary), "recipe" (table in manifest), "dependency" (source). We've come to refer to all of these as "target" but really they are "artifact", "artifact definition or spec", and "artifact source".
2 Likes