-
Notifications
You must be signed in to change notification settings - Fork 211
Is multi targets build supposed to be merged into single index.html? #2749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I assume you mean The rustdoc for a specific target is 100% separate from the other targets, so the result of adding targets here is that you have a dropdown: ![]() where your users can select the target they are working on, to find the docs for that target. |
I'm not sure I follow, what do you mean my "merged"? do you have a more specific example? |
I see, didn't notice it.
Sorry, doesn't matter if the targets config is designed to a dropdown point to different target. What originally in my mind was a single platform agnostic page that have different targets specific docs info with labels aside, such as the combination of following two. |
That would be a change to rustdoc itself, not docs.rs. Rustdoc requirements are managed on rust-lang/rust. |
rustdoc generates documentation based on |
That's true, and I already try to use it. But apparently for some APIs we had it is not possible to build on the different OS because of upstream crate use |
The platform dropdown works fine for me. Just come up with a follow up question: how to properly write in the docstring the link to other platform doc of the crate? I'll open an issue if this is a valid request and things are not supported yet. @syphar thanks in advance. |
You need to use plain paths (with |
You mean the plain URL? |
It's like when using |
Cool, it works. Thanks. |
I set
targets = ["x86_64-apple-darwin", "x86_64-pc-windows-msvc"]
in order to have docs show for both apple and windows. Both of them are successfully built (I tried locally with docker-compose) but it only shows the docs ofx86_64-apple-darwin
. If I switch windows one to be the first, only windows docs shows. Here is what I have in the crate:What I expect intuitively when using
targets
is the docs from different build target will be merged. Is there way to config for it? Otherwise, I don't know what istargets
field used for.I realize there are some tricky issues such as conflicting if I set
pub use xxx as default
for one target andpub use yyy as default
for the other. I assume by combine with rust-lang/rust#43781, it is possible to have fine control on what to show in the combined docs after detecting the conflict?The text was updated successfully, but these errors were encountered: