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.
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.
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 todocs.rsisn't the best because I personally would like to runcargo docand get the same default behaviour that docs.rs has.