Skip to content

De-stabilize target spec JSON  #71009

Open
@Mark-Simulacrum

Description

@Mark-Simulacrum

In a recent Zulip discussion, it was noted that we currently consider JSON target specifications unstable, in the sense that options are relatively freely added and removed.

Currently, the compiler will load target specifications from three places.

If a triple is passed without trailing ".json":

  • a built-in list, specified as Rust structs
  • $RUST_TARGET_PATH, split like PATH on the system we're running on, or, if not set, the current directory.
    • we then attempt to load $triple.json from the directories listed

If a triple is passed with .json, then we directly attempt to load that file path (relative or absolute).

This is the history as best as I can tell:

I cannot currently find any explicit discussion around stability, but presumably that discussion did happen at some time, happy to receive links to it. I would like to propose that we de-stabilize the RUST_TARGET_PATH and file-path loading, making only built-in targets usable. To my knowledge, this essentially is already the status quo: you need to build core/std to actually use a target, and that's not possible on beta/stable without intentional stability holes like RUSTC_BOOTSTRAP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-stabilityArea: `#[stable]`, `#[unstable]` etc.A-target-specsArea: Compile-target specificationsC-discussionCategory: Discussion or questions that doesn't represent real issues.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions