Rfcs: Default cargo features should include doc-default features

Created on 5 Mar 2017  路  2Comments  路  Source: rust-lang/rfcs

Crate maintainers should be allowed to specify features which are off by default, but enabled by default in docs. This would allow people to compile docs for all of the extra features, while also turning these features off by default for most builds.

T-doc

Most helpful comment

Personally, I think that a docs-default = [...] option would suffice; it'd be not too difficult to implement, and could be implemented in cargo itself. I think that just isolating this to docs.rs isn't the best because I personally would like to run cargo doc and get the same default behaviour that docs.rs has.

All 2 comments

rust-lang/rust#9461 has some discussion related to this (in the context of docs.rs), and also links to onur/docs.rs#73 which contains a similar thing, but specifically for docs.rs.

Given that other folks are generating documentation than docs.rs, it does seem like a general configuration variable would be appropriate.

Personally, I think that a docs-default = [...] option would suffice; it'd be not too difficult to implement, and could be implemented in cargo itself. I think that just isolating this to docs.rs isn't the best because I personally would like to run cargo doc and get the same default behaviour that docs.rs has.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

p-avital picture p-avital  路  3Comments

rudolfschmidt picture rudolfschmidt  路  3Comments

clarfonthey picture clarfonthey  路  3Comments

3442853561 picture 3442853561  路  3Comments

3442853561 picture 3442853561  路  4Comments