4 ms·
Is it possible to link your local core and library docs yet? I have my dependencies documented locally, I have the standard library documented locally, both of
by Buttons840 6y ago
Is it possible to link your local core and library docs yet?
I have my dependencies documented locally, I have the standard library documented locally, both of these work well with the ability to do searches just like the online docs. The problem is they're separate. The local docs for one of my crates cannot link to my local standard library docs; instead, I have to jump around different browser tabs and manually look things up.
There used to be some hacks that could work around this, but those hacks stopped working.
- est31 6y agoInteresting question. Does RUSTDOCFLAGS="--extern-html-root-url std=file:///path/to/std/docs" cargo doc work? You can repeat it for std, core, alloc, proc-macro, etc.
- steveklabnik 6y agoYou need a -Z unstable-options in there too, but this does not work for me with the latest nightly.
- est31 6y agoHmm apparently there is a cargo feature for it now: https://github.com/rust-lang/cargo/blob/master/src/doc/src/reference/unstable.md#rustdoc-map https://github.com/rust-lang/cargo/blob/master/src/doc/src/r... So something like this in .cargo/config: [doc.extern-map] std = "local" And then cargo +nightly doc -Zrustdoc-map.
- steveklabnik 6y agoVery cool!