Crate target_spec_json

Crate target_spec_json 

Source
Expand description

Structured access to rustc --print target-spec-json and --print all-target-specs-json.

§Usage

Add this to your Cargo.toml:

[dependencies]
target-spec-json = "0.2"

Both --print target-spec-json and --print all-target-specs-json are unstable interfaces and may not work with certain version combinations of Rust versions and target-spec-json versions.

The following are combinations that have been confirmed to work:

target-spec-jsonRust
0.2.6nightly-2025-11-29
0.2.5nightly-2025-10-08 - nightly-2025-10-30
0.2.4nightly-2025-09-23 - nightly-2025-10-07
0.2.3nightly-2025-09-01 - nightly-2025-09-22
0.2.2nightly-2025-08-31
0.2.1nightly-2025-08-10 - nightly-2025-08-30
0.2.0nightly-2025-07-06 - nightly-2025-08-08

Structs§

Error
Metadata
StackProbes
TargetSpec

Enums§

Arch
BinaryFormat
Env
Os
PanicStrategy
Sanitizer
TargetEndian
TargetFamily

Functions§

all_target_specs_json
<rustc> -Z unstable-options --print all-target-specs-json
target_spec_json
<rustc> -Z unstable-options --print target-spec-json --target <target>

Type Aliases§

AllTargetSpecs