Skip to content

Target specification? #6

@ehuss

Description

@ehuss

This issue is for tracking any possible work needed for custom target specifications.

The current target JSON specification was introduced in RFC 131, implemented in 16156, updated in 49019. Although it can be used on stable rustc, in practice you likely need nightly-only features to use it.

It is unlikely that Cargo will need to add any special handling for the format (except if the extension changes). Cargo already supports JSON target files. However, when std-aware Cargo becomes stable, this suddenly offers an opportunity for the target specification to be more usable on stable. The teams will need to decide if they are comfortable with proceeding with the current format, or if stabilizing std-aware cargo should be gated on changing it.

There have been a few issues brought up with the current format:

  • Doubts about using JSON. Some have suggested switching to TOML.
  • The format is somewhat tied to LLVM. There are some concerns that may make using other backends more difficult. Here is a suggestion for making the backend explicit.
  • See the A-target-specs issues.

Please leave any comments about ideas, possible changes, whether or not this should gate anything, or if the current ("stable") syntax is sufficient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCDiscussion for a possible new RFCS-needs-designStatus: needs design workstabilization blockerThis needs a resolution before stabilization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions