docs(docker): update deployment section for share-generics and multi-arch (whatsapp-rust#845) - #316
Conversation
Documents the Dockerfile changes from whatsapp-rust#845: - Share-generics and build-std flags for ~15% .text reduction - Native multi-arch docker buildx support via explicit target triple - Pinned cargo-chef version for reproducible builds https://claude.ai/code/session_01UZ2bnjKZoCx8UrC1umcUmw
|
Warning Review limit reached
More reviews will be available in 9 minutes and 58 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d157935989
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 4. Produces a final image from `scratch` containing only the binary | ||
| 1. Uses `rust:alpine` with [cargo-chef](https://github.com/LukeMathWalker/cargo-chef) (pinned to a fixed release with `--locked`) for efficient, reproducible dependency caching | ||
| 2. Detects the host target triple at build time — `docker buildx build --platform linux/arm64` produces native binaries without Dockerfile changes | ||
| 3. Enables `-Zshare-generics=y` and recompiles `std` with the release profile (`-Zbuild-std`) so it participates in fat LTO; together these reduce `.text` by ~15% compared to a plain `cargo build --release` |
There was a problem hiding this comment.
Correct the Docker flag size-reduction claim
This line attributes the ~15% .text reduction to only -Zshare-generics plus -Zbuild-std, but the new changelog breaks those Docker-only changes out as 666 KiB (-5.6%) plus 303 KiB, and says the 15.6% figure is cumulative only when combined with earlier library-level deduplication in #842–#844. As written, users comparing the Docker flags against a plain cargo build --release will expect about twice the documented reduction.
Useful? React with 👍 / 👎.
…mulative The ~15% figure is cumulative across the full optimization series (#842–#845). The two Docker-only flags contribute ~8%: -Zshare-generics (-5.6%) plus -Zbuild-std (~-300 KiB). Addresses Codex review on #316. https://claude.ai/code/session_01UZ2bnjKZoCx8UrC1umcUmw
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
…tion Rewrite to state the 8% as a direct reduction these flags produce, then cite the 15% cumulative total separately — avoids "8% of 15%" being read as 8%×15%=1.2%. Addresses cubic review on #316. https://claude.ai/code/session_01UZ2bnjKZoCx8UrC1umcUmw
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Summary
Documents the Dockerfile changes merged in oxidezap/whatsapp-rust#845.
installation.mdx+pt/installation.mdx: Updates the Docker deployment build-process list and the cross-compilation note to reflect the new behavior:cargo-chefis now pinned to a fixed version with--lockedfor reproducible image buildsdocker buildx build --platform linux/arm64works natively without modifications-Zshare-generics=yand-Zbuild-stdare now enabled in the image, reducing.textby ~15% cumulatively; the nightly-only Note explains these flags don't affect stable consumerschangelog/2026-06-11-dockerfile-share-generics.mdx: New changelog entry covering the measured size reductions, the share-generics/build-std mechanism, explicit target detection, and the cargo-chef pindocs.json: Registers the new changelog page at the top of the changelog navigationTest plan
installation.mdxreads correctlypt/installation.mdxis consistenthttps://claude.ai/code/session_01UZ2bnjKZoCx8UrC1umcUmw
Generated by Claude Code
Summary by cubic
Update Docker deployment docs to match the new Dockerfile: native
docker buildxmulti-arch via explicit target detection, pinnedcargo-chef, and nightly-Zshare-generics+-Zbuild-std(per-flag impact: −5.6%.textand ~−300 KiB). Clarifies wording to state these flags reduce.textby ~8% on their own and that ~15% is cumulative across #842–#845, and adds a new changelog entry registered indocs.json.Written for commit 9370597. Summary will update on new commits.