Skip to content

release: v0.5.0#97

Merged
iainmcgin merged 1 commit intomainfrom
release/0.5.0
May 5, 2026
Merged

release: v0.5.0#97
iainmcgin merged 1 commit intomainfrom
release/0.5.0

Conversation

@iainmcgin
Copy link
Copy Markdown
Collaborator

@iainmcgin iainmcgin commented May 5, 2026

Release prep for v0.5.0.

What's in this PR

  • Version bump — workspace 0.4.00.5.0, all intra-workspace dep pins, README.md / docs/guide.md / docs/migration-from-{prost,protobuf}.md / buffa/src/lib.rs version refs, gh release download examples in the guide.
  • Cargo.lock regen — workspace, all 4 examples (addressbook, conflicts, envelope, logging), and both benchmark crates.
  • CHANGELOG## [Unreleased]## [0.5.0] - 2026-05-05 with:
    • a top-of-section blurb stating that consumers with checked-in generated code must regenerate (0.5.0 codegen output references ViewReborrow, decode_bytes_to_bytes, and __private::arbitrary_bytes, none of which exist in buffa 0.4.0);
    • a ### Breaking changes section for #[non_exhaustive] on GeneratedFileKind;
    • footer compare-links updated (and a missing [0.4.0] link added).
  • Benchmark refresh — re-ran task bench-cross and task bench-charts on the same hardware as the prior baseline (Intel Xeon Platinum 8488C). README tables and all 25 SVG charts updated; 5 new build-encode-*.svg charts added. The Binary encode table picks up the buffa (view) and prost (bytes) columns the chart generator now emits, and the README gains a Build + binary encode section that was previously omitted.

What's in 0.5.0

15 commits since v0.4.0 (f444eaba..ffcd6c08):

PR Change Issue
#74 zero-copy Bytes in to_owned via slice_ref #52
#77 bytes_fields paths through ::buffa::bytes:: re-export
#78 write_to emits fields in field-number order #75
#79 dual-review workflow
#72, #89 cla-action bumps
#73 file_per_package codegen option
#86 --version / --help for plugin binaries
#87 rustdoc -D warnings cleanup
#94 AIP-192 cross-refs → intra-doc links #26
#96 natural-path re-exports of __buffa:: ancillary types #80
#95 ViewReborrow safe trait + OwnedView::reborrow #82
#90 arbitrary + Bytes shims; --all-features CI step #88
#84 decode_bytes_to_bytes zero-copy decode #53, #76(b)
#91 GeneratedFileKind::Companion + apply_companions; #[non_exhaustive] #81

Why 0.5.0, not 0.4.1

#[non_exhaustive] on buffa_codegen::GeneratedFileKind plus the new Companion variant (#91) are SemVer-breaking for any consumer with an exhaustive match. The known consumer (connect-rust) only uses == and is unaffected, but the contract changed. Several other PRs change codegen output in ways that couple codegen and runtime versions (#84, #90, #95), which is also a minor-bump signal.

Benchmark deltas vs prior README baseline

The prior baseline was committed on 2026-04-22 (a0c668c0, pre-v0.4.0), so the comparison spans the 0.4.0 and 0.5.0 changes. Run-to-run Docker noise is ±5–15%; the largest deltas were investigated with a native bench (±1%) and perf before opening this PR.

  • GoogleMessage1 decode: 1,014 → 905 MiB/s (−11%) in Docker. Native bench shows no v0.4.0 → v0.5.0 change (both 221.2-221.3 ns / 983 MiB/s). There is a real ~2% delta vs the prior baseline (216.8 ns / 1003 MiB/s), but it shipped in v0.4.0. perf record attributes it to drop_in_place::<GoogleMessage1> doubling (1.21% → 2.37% of cycles) plus Message::decode no longer being inlined into the benchmark closure. Bisect lands the change at Externalize size cache: remove __buffa_cached_size from generated structs #22 (size-cache externalization), which removed __buffa_cached_size: CachedSize from generated structs; GoogleMessage1SubMessage shrank from 160 → 152 bytes, crossing a glibc malloc size-class boundary. A small, intentional layout cost from making generated structs Send/Sync. The Docker −11% headline is ~5× the actual effect.
  • AnalyticsEvent encode: 656 → 582 MiB/s (−11%) and GoogleMessage1: 2,594 → 2,441 (−6%). Likely attributable to the write_to field-number-order change in codegen: emit write_to fields in field-number order, not by kind #78 (a 0.4.0-era PR) — the previous group-by-kind ordering had cache benefits for messages with mixed field cardinality, traded for cross-implementation byte-equivalence. Intentional, documented trade-off (CHANGELOG codegen: write_to emits singular fields before repeated fields, not in field-number order #75).

Other deltas are in the noise band or improvements (MediaFrame decode +5%, LogRecord JSON decode +5%). No regressions in this release — the deltas vs the README's prior numbers shipped in v0.4.0.

Pre-tag verification (matches CI)

  • cargo test --workspace — 1571 pass
  • cargo clippy --workspace --all-features --all-targets -- -D warnings — clean
  • RUSTDOCFLAGS=-D warnings cargo doc --workspace --all-features --no-deps — clean
  • cargo +1.95 fmt --all --check — clean
  • task gen-wkt-types — no drift
  • task lint-md — clean

After merge

  • Tag v0.5.0 on the merge commit
  • Dispatch publish-crates.yml
  • Bump connect-rust to depend on buffa 0.5.0, adopt apply_companions (replaces the kind: GeneratedFileKind::Owned workaround in connectrpc-codegen/src/codegen.rs), then cut connect-rust 0.4.0

Release prep for v0.5.0.

- Version bump: workspace 0.4.0 -> 0.5.0, all intra-workspace dep pins,
  README.md / docs / lib.rs version refs.
- Cargo.lock regen for the workspace, all 4 examples, and both benchmark
  crates.
- CHANGELOG: new [0.5.0] section with a regeneration-required blurb,
  ### Breaking changes section for #[non_exhaustive] GeneratedFileKind,
  and footer compare-links updated (also adds the missing v0.4.0 link).
- Benchmark refresh: re-ran `task bench-cross` and `task bench-charts`.
  README tables and SVG charts updated. Adds the `Build + binary encode`
  section and `buffa (view)` / `prost (bytes)` columns to the encode
  table that the chart generator now emits but the README didn't have.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@iainmcgin iainmcgin marked this pull request as ready for review May 5, 2026 23:48
@iainmcgin iainmcgin requested a review from rpb-ant May 5, 2026 23:48
@iainmcgin iainmcgin enabled auto-merge (squash) May 5, 2026 23:48
@iainmcgin iainmcgin merged commit c751538 into main May 5, 2026
7 checks passed
@iainmcgin iainmcgin deleted the release/0.5.0 branch May 5, 2026 23:48
@github-actions github-actions Bot locked and limited conversation to collaborators May 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants