-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Problem
I'm currently working on a project that uses a custom target spec, so I need to use build-std to build core, alloc, and compiler_builtins. Naturally, this means that my target doesn't have precompiled documentation for core and alloc, which breaks intra-doc links and hides which APIs are available on my target (including the elusive AtomicU128).
Proposed Solution
If the project is already using build-std (eg. in .cargo/config.toml), cargo doc should automatically build the documentation for the requested sysroot crates. This would require rust-src, but build-std already requires that anyway.
As a workaround for this issue, I've written a script that makes the appropriate calls to rustdoc for my project. It's hacky (it depends on the layout of the sysroot and uses the exact names of build artifacts, including hashes), but I hope it may prove useful in informing any implementation efforts.
Notes
@rustbot label +Z-build-std