rust icon indicating copy to clipboard operation
rust copied to clipboard

Add metadata to targets

Open Noratrieb opened this issue 1 year ago • 2 comments

follow up to #121905 and #122157

This adds four pieces of metadata to every target:

  • description
  • tier
  • host tools
  • std

This information is currently scattered across target docs and both

  • not machine readable, making validation harder
  • sometimes subtly encoding by the table it's in, causing mistakes and making it harder to review changes to the properties

By putting it in the compiler, we improve this. Later, we will use this canonical information to generate target documentation from it.

I used find-replace for all the description: None.

One thing I'm not sure about is the behavior for the JSON. It doesn't really make sense that custom targets supply this information, especially the tier. But for the roundtrip tests, we do need to print and parse it. Maybe emit a warning when a custom target provides the metadata key? Either way, I don't think that's important right now, this PR should get merged ASAP or it will conflict all over the place.

r? davidtwco

Noratrieb avatar Mar 10 '24 19:03 Noratrieb

These commits modify compiler targets. (See the Target Tier Policy.)

rustbot avatar Mar 10 '24 19:03 rustbot

@bors p=1

Noratrieb avatar Mar 10 '24 19:03 Noratrieb

@bors r+

davidtwco avatar Mar 11 '24 10:03 davidtwco

:pushpin: Commit 5bcb66cfb36d19b84ff51cf923c1d3536d446281 has been approved by davidtwco

It is now in the queue for this repository.

bors avatar Mar 11 '24 10:03 bors

:hourglass: Testing commit 5bcb66cfb36d19b84ff51cf923c1d3536d446281 with merge d255c6a57c393db6221b1ff700daea478436f1cd...

bors avatar Mar 11 '24 12:03 bors

:sunny: Test successful - checks-actions Approved by: davidtwco Pushing d255c6a57c393db6221b1ff700daea478436f1cd to master...

bors avatar Mar 11 '24 14:03 bors

Finished benchmarking commit (d255c6a57c393db6221b1ff700daea478436f1cd): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.6% [0.6%, 0.6%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [0.6%, 0.6%] 1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.7% [3.6%, 6.2%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-0.8%, -0.8%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 647.279s -> 647.596s (0.05%) Artifact size: 310.00 MiB -> 310.01 MiB (0.01%)

rust-timer avatar Mar 11 '24 15:03 rust-timer