Skip to content

Conversation

@qb42
Copy link
Contributor

@qb42 qb42 commented Jan 1, 2026

This is a rough draft inspired by @ChrisDenton in #150501 (comment). I won't have much time to work on it until next month but I wanted to get it out there.

This is implemented as an mdbook preprocessor that pulls data from the rustc_target crate, so it will always be accurate.

Assuming this works as intended (I am not set up to test locally), it's still missing the following:

  • Links to target detail pages
  • Footnotes

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 1, 2026
@rust-log-analyzer

This comment has been minimized.

@Noratrieb
Copy link
Member

This is very cool! I started a similar effort a while ago in #120745 but never got to completing it. Maybe some of the code in the linked PR thee may be useful

@qb42
Copy link
Contributor Author

qb42 commented Jan 2, 2026

@Noratrieb Thanks, I'll take a look.

@qb42 qb42 force-pushed the generate-platform-support-tables branch from 7908030 to ab9e5d8 Compare January 2, 2026 23:13
@rust-log-analyzer

This comment has been minimized.

@qb42 qb42 force-pushed the generate-platform-support-tables branch from ab9e5d8 to 8c1125f Compare January 3, 2026 07:56
@qb42
Copy link
Contributor Author

qb42 commented Jan 3, 2026

Alright, I'm set up properly now so no more failing tidy or pushing obvious mistakes.

Unfortunately it looks like depending on rustc_target directly is a dead-end, I'm getting a variety of errors related to it being a compiler-internal crate that is supposed to be compiled as part of bootstrap. The commit I just pushed (8c1125f) is my last attempt in that direction unless someone else has a solution.

I'm going to switch to pulling data from rustc -Z unstable-options --print all-target-specs-json and see how that goes.

@rust-log-analyzer

This comment has been minimized.

@Noratrieb
Copy link
Member

Executing rustc like that seems like the best approach, yes.

@qb42 qb42 force-pushed the generate-platform-support-tables branch from 8c1125f to 25ef1e7 Compare January 5, 2026 18:48
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
[TIMING:start] doc::RustcBook> { target: aarch64-unknown-linux-gnu, name: "rustc", src: "/checkout/obj/build/aarch64-unknown-linux-gnu/md-doc/rustc", parent: Some(RustcBook { build_compiler: Compiler { stage: 1, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu, validate: false }), languages: [], build_compiler: None }
Rustbook (aarch64-unknown-linux-gnu) - rustc
 INFO Book building has started
ERROR The command `cargo run --manifest-path ../../../../src/tools/mdbook-rustc/Cargo.toml` wasn't found, is the `rustc-gen-target-tables` preprocessor installed? If you want to ignore this error when the `rustc-gen-target-tables` preprocessor is not installed, set `optional = true` in the `[preprocessor.rustc-gen-target-tables]` section of the book.toml configuration file.
Error: Unable to run the preprocessor `rustc-gen-target-tables`
 Caused By: No such file or directory (os error 2)
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Command `/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools-bin/rustbook build /checkout/obj/build/aarch64-unknown-linux-gnu/md-doc/rustc -d /checkout/obj/build/aarch64-unknown-linux-gnu/doc/rustc --rust-root /checkout` failed with exit code 101
Created at: src/bootstrap/src/core/build_steps/tool.rs:1612:23
Executed at: src/bootstrap/src/core/build_steps/doc.rs:176:18

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:36:30
  local time: Mon Jan  5 19:30:07 UTC 2026
  network time: Mon, 05 Jan 2026 19:30:07 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants