cuviper / autocfg

Automatic cfg for Rust compiler features
Apache License 2.0
95 stars 24 forks source link

Add documentation link to Cargo.toml #47

Closed LingMan closed 2 years ago

LingMan commented 2 years ago

Crates.io generates its link to the documentation from this value.

taiki-e commented 2 years ago

FYI, the current crates.io can automatically link to docs.rs.

link

https://doc.rust-lang.org/cargo/reference/manifest.html#the-documentation-field

If no URL is specified in the manifest file, crates.io will automatically link your crate to the corresponding docs.rs page.

LingMan commented 2 years ago

Oh, I wasn't aware of that. Weirdly the link doesn't show up when I open the page: Screenshot from 2022-07-26 20-54-29

cuviper commented 2 years ago

Do you have javascript disabled? I see a slight delay before the doc link pops in, so I suppose it's not part of the static content.

LingMan commented 2 years ago

No, but a good pointer. uMatrix blocked the load from docs.rs. Crates that specify the link in their Cargo.toml show up just fine though.

cuviper commented 2 years ago

Ok -- I took a closer look at how rayon loads, as it has a similar documentation link. The page shows the manifest's unversioned link at first, and then it changes to specific doc version. That seems like a good experience to me!

bors r+

bors[bot] commented 2 years ago

Build succeeded: