-
Notifications
You must be signed in to change notification settings - Fork 203
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
Set default target for certain crates, also features #29
Comments
Same idea, but different problem: https://docs.rs/crate/clang-sys fails to find libclang (obviously). There is a feature to do a runtime link instead of a compile time link, so it should fix the problem. |
I will add building crates with extra features but where is best place to define docs.rs specific options? Maybe a |
IIRC, we made a |
Oh, it's |
A use-case I have: cocoa-rs is a crate managed by Servo. Servo currently does not build documentation on the OSX builders (https://doc.servo.org is Linux IIRC). It'd be nice if I could link to the documentation for cocoa-rs for the latest published version that was built on OSX. That said, I juts checked it looks like cocoa-rs isn't building on docs.rs, which makes my whole comment moot anyways. |
Doc features are great. What I do in ndarray is to build with the "docs" feature that depends on the optional crate features. Then I've made sure each of the items enabled by that mentions this in the docs (“Requires crate feature "serde"”). Adding this to docs.rs would make it have "feature parity" and I'll switch. |
This patch is adding `Metadata` type used in `cargo::ops::CompileOptions` to customize docs.rs builds. An example metadata in Cargo.toml: ```text [package] name = "test" [package.metadata.docs.rs] features = [ "feature1", "feature2" ] all-features = true no-default-features = true default-target = "x86_64-unknown-linux-gnu" rustc-args = [ "--example-rustc-arg" ] rustdoc-args = [ "--example-rustdoc-arg" ] dependencies = [ "example-system-dependency" ] ``` This patch is still work in progress and aiming to fix: #29, #48 and #50 - [ ] Save default target to database. - [ ] Install system dependencies before building a package.
This is partially fixed, looks like a commit closed this. Docs.rs now supports building non-default features but it is not redirecting to default-target yet. |
Would be really cool to have the default-target redirect working. It's incredibly frustrating when people look for the documentation for |
#255 fixed this |
Crates that set a |
For certain crates I'd like it if I could set the default target, so that when someone looks up a certain crate, they'd get the documentation I want them to get by default. Particularly useful for crates that only define things for certain targets, such as
winapi
.Also useful would be a way to tell docs.rs which features to enable when building a crate.
winapi
0.3 will have almost everything disabled by default, and then opting in with features, but that would end up with docs.rs generating useless documentation.The text was updated successfully, but these errors were encountered: