Find alternative dependency to reqwest
infinity0 opened this issue · comments
Hi, this package is now part of the dependency set of rustc. However it pulls in a ton of other dependencies via reqwest
, making the bootstrap set of rustc including openssl and lots of other packages, all for the sake of checking links. This is totally unnecessary, remove reqwest from this package allows rustc to avoid a dependency on openssl and various other packages. Please consider finding a more lightweight alternative to using reqwest.
On a closer examination, it looks like rustc pulls in this package but does not actually use it in the build - it is an optional feature of rustbook and rustc does not enable that feature. So I'll be able to easily patch it out when packaging rustc, and this issue is not so urgent (unless/until rustc decides to integrate this package more deeply).
Actually, rustc does indeed use this tool. So for now I'll have to patch it out in order to reduce the dependency footprint of rustc in Debian.
I believe this package is only used when generating documentation, so patching it out should just be a case of removing [output.linkcheck]
entries from the various book.toml
files.
[book]
title = "Guide to Rustc Development"
author = "Rustc developers"
description = "A guide to developing rustc"
[build]
create-missing = false
[output.html]
git-repository-url = "https://github.com/rust-lang/rustc-guide"
[output.html.fold]
enable = true
level = 1
- [output.linkcheck]
- follow-web-links = true
- exclude = [ "crates\\.io", "gcc\\.godbolt\\.org", "youtube\\.com", "dl\\.acm\\.org" ]
- cache-timeout = 172800
- warning-policy = "error"
Alternatively, I believe the rustbook
build tool has a feature for enabling linkchecking. So there may be a way to disable it when building rustc
.
Disabling mdbook-linkcheck
is probably the best approach because pretty much every alternative HTTP client will have a dependency on openssl.
I think the proposed fix (patching book.toml
to not require mdbook-linkcheck
) should work here.
@infinity0, let me know if I should re-open this issue and we can discuss things further.