Repository navigation
ci(release): enable mimalloc in release rledger binaries (-7% load) - #1601
Conversation
Follow-up to #1599 (mimalloc opt-in feature) + #1600. The release builds use --no-default-features, so the opt-in feature wasn't reaching shipped binaries. Add --features mimalloc to the rledger builds (PGO Unix/Windows + native non-cross) so released binaries get the ~7% lower-load allocator win. Cross-compiled targets are intentionally excluded: mimalloc's vendored C build isn't validated under cross here, and a release shouldn't hinge on it — they ship without the allocator. Feature resolution verified locally (cargo build --no-default-features --features mimalloc resolves at the virtual workspace root); rledger output is unchanged (allocator-only).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Updates the release CI workflow so native rledger release binaries are built with the opt-in mimalloc allocator feature, restoring the performance win introduced in #1599 while keeping cross-compiled targets unchanged (to avoid unvalidated C cross-build risk).
Changes:
- Add
--features mimallocto the Unix and Windows PGO build/optimize steps forrledger. - Add
--features mimallocto the native (non-cross) non-PGOcargo buildpath in the release workflow. - Document (in-workflow) why cross targets intentionally do not enable
mimalloc.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
|
Good point — tightened in the latest push. Reworded the cross-branch note to say plainly "Cross-compiled targets: NO mimalloc" and labeled the non-cross else branch "Native (non-cross) target: mimalloc enabled", dropping the ambiguous "PGO + non-cross" phrasing from inside the non-PGO step. |
What
Enables the
mimallocglobal allocator in the releaserledgerbinaries (the-7%load win from #1599), for native targets.Why
#1599 added
mimallocas an opt-in feature (correctly non-default, so it doesn't force a C dep on library consumers). But the release pipeline builds with--no-default-features, so the win wasn't reaching shipped binaries. This wires--features mimallocinto those builds.How
Append
--features mimallocto therledgerbuild commands inrelease-build.yml:cargo pgo build/cargo pgo optimize build)cargo build --profile …)Cross targets intentionally excluded
mimalloc is a vendored C library; its cross build (musl / Windows-ARM / …) under
crossisn't validated here, and a release shouldn't hinge on it. Cross-compiled targets ship without the allocator (no win, no risk); native targets get it.rledger-lsp/ag-rledgerare separate binaries and unaffected.Verification
-p:cargo build --no-default-features --features mimallocbuilds clean (tested locally).release-build.ymlis valid YAML; mimalloc added to 4 native build lines, cross excluded.rledger checkidentical).🤖 Generated with Claude Code