Repository navigation
refactor(help): embed man pages without a tarball - #17640
Conversation
|
r? @Muscraft rustbot has assigned @Muscraft. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Alternatively, we stop compressing and include the text directly. Wasn't sure how reproducible the tgz would be or having a binary in the repo when I was planning to address this. |
|
Under flate2's gz deterministic mode it should be fairly reproducible I think. Granted on Windows we need to deal with crlf stuff perhaps via gitattribute or normalization. I can try digging a bit deeper and check the size difference with and without compression. |
The result looks promising especially for the compressed size! |
|
Those numbers in any direction don't matter that much. build.rs reduction is what I looks for. Let's go. @rustbot merge. |
Update cargo submodule 7 commits in cad07cf8e597397fff5d0f6cb79c9f870c0b1dd2..31d3246e0e8d3a80d4a90b54aa48ff180adb408b 2026-10-23 22:04:58 +0000 to 2026-10-27 13:54:39 +0000 - Warn about conflicting proc-macro manifest settings (rust-lang/cargo#17641) - docs: use latest `resolver` and `edition` in examples (rust-lang/cargo#17644) - docs(hints): write mostly-unused docs as end-user documentation (rust-lang/cargo#17549) - refactor(help): embed man pages without a tarball (rust-lang/cargo#17640) - refactor(cargo-test-support): remove build.rs (rust-lang/cargo#17638) - fix: exclude abspath of path deps from `-Cmetadata` hash (rust-lang/cargo#17624) - use build-rs for buildscripts (rust-lang/cargo#17637) r? ghost
Update cargo submodule 7 commits in cad07cf8e597397fff5d0f6cb79c9f870c0b1dd2..31d3246e0e8d3a80d4a90b54aa48ff180adb408b 2026-10-23 22:04:58 +0000 to 2026-10-27 13:54:39 +0000 - Warn about conflicting proc-macro manifest settings (rust-lang/cargo#17641) - docs: use latest `resolver` and `edition` in examples (rust-lang/cargo#17644) - docs(hints): write mostly-unused docs as end-user documentation (rust-lang/cargo#17549) - refactor(help): embed man pages without a tarball (rust-lang/cargo#17640) - refactor(cargo-test-support): remove build.rs (rust-lang/cargo#17638) - fix: exclude abspath of path deps from `-Cmetadata` hash (rust-lang/cargo#17624) - use build-rs for buildscripts (rust-lang/cargo#17637) r? ghost
What does this PR try to resolve?
Inspired by #17637.
Two things
include_str!to embed those help texts. (as suggested in refactor(help): embed man pages without a tarball #17640 (comment))This shows that we can move build time code generation to xtask :)
Notes to reviewers
Binary size benchmark result (LLM assisted):
so, about 644 KiB larger on disk, but about 4.8 KiB smaller gzipped and about 45-47 KB smaller xz-compressed. I think compressed size may matter more for downloads, unless we are going to expand our help man pages ten times more in the future.
BTW, in the future we should probably move some of our CI check to (snapshot) tests.
That is a pattern we kinda want to advocate.
🤖 LLM involvement: Help verify everything is the same and working well, as well as the binary size benchmark.