-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add docs.rs metadata and custom builds #73
Conversation
Do you have a staging server? I'd be happy to test this out for you with the ring crate, which needs to be built with |
Unfortunately there isn't any staging server and docs.rs is only working with central repository (crates.io). I'll upload a dummy package to test this. |
Coming here from https://github.com/onur/docs.rs/issues/23#issuecomment-242943910. We are facing a similar issue while trying to automate Debian packaging, and we'd like to have some hints from crate author regarding which system packages need to be installed in order to properly build. The
May I suggest putting together a strawman proposal of a metadata schema somewhere (eg. https://wiki.debian.org/Teams/RustPackaging/)? |
opam, the ocaml package manager, is able to deal with non-ocaml system dependencies and interact generically with a system package manager. I will dig out docs for that later today and comment in more detail. |
What is this blocked on? |
Actually there is nothing blocking this issue. I wanted docs.rs to build everything automatically without requiring any user input but looks like its not enough. I'll finish this feature and add into docs.rs next week. |
@onur have you seen https://github.com/joshtriplett/metadeps? It is supposed to solve this problem in a distro-agnostic way. /cc @joshtriplett |
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 so very sorely needed. Can this be merged soon? |
@SergioBenitez I am working on it. |
Checking in. How's it going, @onur? |
Good work with this. This would be great for a number of projects that are currently failing to build on docs.rs. If there's any way we can help, let us know. |
Docs.rs is never running rustc on main crate and because of this reason, cargo is ignoring rustdoc-args when rustc-args set. Users must define rustdoc-args to manipulate rustc.
A new feature was just merged into docs.rs (https://github.com/onur/docs.rs/pull/73) which will hopefully make it possible for Tectonic to build on their system, which would be great. As far as I can tell, we won't be able to check if this is working until the next release is made, since docs.rs pulls releases from crates.io. But might as well get it in now.
All the other features are either irrelevant, for nightly or already included by default so this should build with all features. https://github.com/onur/docs.rs/pull/73 Fixes clap-rs#73
All the other features are either irrelevant, for nightly or already included by default so this should build with all features. https://github.com/onur/docs.rs/pull/73 Fixes clap-rs#911
Add docs feature to docs.rs metadata see https://github.com/onur/docs.rs/pull/73
Add docs feature to docs.rs metadata see https://github.com/onur/docs.rs/pull/73
Add docs feature to docs.rs metadata see https://github.com/onur/docs.rs/pull/73
All the other features are either irrelevant, for nightly or already included by default so this should build with all features. https://github.com/onur/docs.rs/pull/73 Fixes #911
Just learned about docs.rs which automatically builds docs for crates. Tell it to build i3ipc with the "dox" feature, which it should listen to thanks to onur/docs.rs#73.
Just learned about docs.rs which automatically builds docs for crates. Tell it to build i3ipc with the "dox" feature, which it should listen to thanks to onur/docs.rs#73.
Just learned about docs.rs which automatically builds docs for crates. Tell it to build i3ipc with the "dox" feature, which it should listen to thanks to onur/docs.rs#73.
Just learned about docs.rs which automatically builds docs for crates. Tell it to build i3ipc with the "dox" feature, which it should listen to thanks to onur/docs.rs#73.
This patch is adding
Metadata
type used incargo::ops::CompileOptions
to customizedocs.rs builds.
An example metadata in Cargo.toml:
This patch is still work in progress and aiming to fix: #29, #48 and #50
TODO