Skip to content

Use default-target to build package #255

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

Merged
merged 3 commits into from
Nov 1, 2018

Conversation

onur
Copy link
Member

@onur onur commented Oct 24, 2018

This is my solution for default-target. It is using default-target metadata option to build package in first place and placing default build to root of the crate documentation directory.

For example winapi will always be build with x86_64-pc-windows-msvc target first and documentation crated with this target will be available in docs.rs/winapi/$version/winapi/.

Copy link
Member

@QuietMisdreavus QuietMisdreavus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! As you mentioned, by doing the initial build on the default-target, this will ensure that crates that only build on that target (or are practically only available on a certain target even if they build everywhere, like winapi) are checked properly before giving up on building their documentation. I have one comment, but since it matches what the old code does, you can merge this without changing it.

Are you planning on rebuilding crates that already have a default-target set? The reason i went with a redirect for my version was because winapi was already published with that set, so it would work without having to rebuild it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants