#16 Distributing documentation of crates
Closed: Won't Fix 2 years ago by zbyszek. Opened 7 years ago by ignatenkobrain.

I think at some point we should think about building docs and distributing them in some subpackage. Though I'm not sure where we will place them (guess something like we do for rust itself).


Good idea.

Do we need to choose a place though? Shouldn't we just use %doc ./target/doc/?
(presuming we ran cargo doc already in %build, probably with --no-deps)

Definitely big enough that they deserve a subpackage, not installed by default. It varies by the size of the crate, of course. For libc with tons of bindings, I get 43MB. Even a tiny library like fnv is still almost 1MB, mainly because of bundled fonts. Maybe we can put those in a common package.

At least this stuff should be highly compressible, so the rpm package itself shouldn't be too big.

I'll make a judgement call and close this. I think we're moving further and further from using rust rpms for any kind of upstream work. So docs would not be useful, or to put it in other words, they could probably find some occasional use, but it's nowhere near to justify the effort and resource consumption that'd be required. Rust docs are heavily hyperlinked and available on the web. Let's just use that.

Metadata Update from @zbyszek:
- Issue close_status updated to: Won't Fix
- Issue status updated to: Closed (was: Open)

2 years ago

FWIW, I agree. For package ecosystems like Ruby or Python, where individual packages are actually installed and used at runtime, having docs for them is sometimes actually useful. That's not the case for Rust crates, which only get installed in ephemeral build environments and never installed by users of Rust applications. And adding the complexity of running "cargo doc" in addition to "cargo build" (which just comes with additional sources of build failures) isn't work it, IMO.

Login to comment on this ticket.

Metadata