release: v0.9.1#335
Merged
Merged
Conversation
Patch release for the 0.9.0 element-memory regression (#331), which made codegen reject schemas of a few hundred .proto files. Ships alongside the field-scoped open-enum reflection fix (#316) and the view unknown-field pointer change (#329). Also corrects the decode-limit documentation. The 0.9.0 notes said the owned, view and reflective decoders are all bounded, which reads as codec-independent; JSON decoding never receives a DecodeOptions, so none of the limits apply to it. DecodeOptions, with_element_memory_limit and the guide now state that scope, and the guide's decode-options table gains the with_element_memory_limit row it was missing. No-Verification-Needed: version bump, generated changelog, and doc-only edits
|
All contributors have signed the CLA ✍️ ✅ |
iainmcgin
marked this pull request as ready for review
July 23, 2026 20:51
iainmcgin
enabled auto-merge
July 23, 2026 20:51
rpb-ant
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cuts v0.9.1, a patch release driven by #331 — a regression 0.9.0 introduced.
Why now
0.9.0's element-memory bound is sized for untrusted wire input, and buffa's own tooling applied it to the descriptor sets it reads. Codegen started rejecting schemas of a few hundred
.protofiles withelement memory limit exceeded, which is a small enough schema to hit in ordinary use. #332 fixed it; this ships it.Three other changes ride along: the field-scoped open-enum reflection fix (#321), the view unknown-field pointer change (#329, ~10% faster view decode on payloads carrying no unknown fields), and a documentation correction described below.
The documentation correction
0.9.0's notes said of the element-memory budget that "the owned, view and reflective (
DynamicMessage) decoders are all bounded". That is true, and it reads as codec-independent, which it isn't — JSON decoding runsserde_jsonstraight into the generatedDeserializeimpls, which never receive aDecodeOptions. A message parsed from JSON is bounded by none of the limits that bound the same message parsed from protobuf, and the amplification is nearly as large there:{}is three JSON bytes for the element footprint that costs two on the wire.Shipping a release about the element-memory bound while the docs overstate which codecs it covers seemed like the wrong pairing, so this adds the scope to
DecodeOptions, towith_element_memory_limit, and to the guide — which was also missingwith_element_memory_limitfrom its decode-options table entirely. Actually bounding the JSON path is a real design decision and stays in #330 for 0.10.0. No behaviour changes here.Version choice
0.9.1 rather than 0.10.0. The only API changes are additive (
DescriptorPool::decode_with_optionsand the newbuffa-codegendecode helpers), and #329's restructuring touches a private field with no public signature change — I checked rather than assumed. That matches the convention stated in the changelog header: breaking changes increment the minor, additive changes the patch.Verification
Ran the CI invocations locally:
cargo clippy --workspace --all-targets --all-features -- -D warnings— cleancargo test --workspace --all-features— 49 suites, 0 failuresRUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps— cleanchangie mergeis idempotent against the committedCHANGELOG.md, socheck-changelogpassesscripts/check-publish-coverage.sh— 8 crates listed and publishableThe only warning anywhere is the documented
editions_2024.protoskip from a protoc older than v30, which is expected outside CI. Conformance was not run locally (no Docker or local runner here); CI covers it.Reviewer notes
descriptor_pool()now scales its decode bound to the bytes embedded in it, and code generated by 0.9.0 keeps the old bound. Thebuffa-buildand plugin fixes apply on rebuild alone. The release notes say this.publish-crates.ymlafter the v0.9.0 tag, so this tag is the first to exercise the current version. ci: repair the duplicate env key that stopped the publish workflow starting #324's bug was a duplicateenv:key that made the workflow silently fail to start — worth watching the run rather than assuming it. Thelint-workflowsactionlint job added in ci: repair the duplicate env key that stopped the publish workflow starting #324 guards that specific class now.Draft pending review.