It's unclear what --features param for cargo publish is used for. My hypothesis is that it's passed into cargo doc on the server side. cargo publish and cargo doc produce docs that miss feature gated items, see famedly_rust_utils for example. cargo doc --all-features includes all feature gated items but doesn't label them. Labeling can be achieved with #![feature(doc_auto_cfg)] which requires nightly compiler. My current suggestion is to use something like
#![cfg_attr(all(doc, not(doctest)), feature(doc_auto_cfg))]
this would require nightly compiler for cargo doc, but for everything else (including doctests) will not.
Moreover docs.rs supports some metadata in Cargo.toml, including
[package.metadata.docs.rs]
all-features = true
It is also documented that docs.rs uses nightly compiler by default.
As for the shipyard.rs it's quite unclear, I suppose we just need to test it.
There's no documentation on whether something like [package.metadata.docs.rs] exists for shipyard.rs, so I guess we can presume that it doesn't, and the only option is to try to simply pass --all-features to cargo publish in hope that it'll be bassed to cargo doc on shipyard side
It's unclear what
--featuresparam forcargo publishis used for. My hypothesis is that it's passed intocargo docon the server side.cargo publishandcargo docproduce docs that miss feature gated items, seefamedly_rust_utilsfor example.cargo doc --all-featuresincludes all feature gated items but doesn't label them. Labeling can be achieved with#![feature(doc_auto_cfg)]which requires nightly compiler. My current suggestion is to use something like#![cfg_attr(all(doc, not(doctest)), feature(doc_auto_cfg))]this would require nightly compiler for
cargo doc, but for everything else (including doctests) will not.Moreover docs.rs supports some metadata in Cargo.toml, including
It is also documented that docs.rs uses nightly compiler by default.
As for the shipyard.rs it's quite unclear, I suppose we just need to test it.
There's no documentation on whether something like
[package.metadata.docs.rs]exists for shipyard.rs, so I guess we can presume that it doesn't, and the only option is to try to simply pass--all-featurestocargo publishin hope that it'll be bassed tocargo docon shipyard side