Conversation
Consolidates breaking changes from #62 (__buffa:: sentinel namespacing, include_proto! macro, per-package register_types) and #55 (ViewEncode, __buffa_cached_size on views) plus the additive/fix entries since 0.3.0. Docs (guide.md, migration-*.md) still reference the old layout — follow-up commit will update those.
- guide.md: rewrite include pattern to buffa::include_proto!; rewrite Oneofs section for __buffa::oneof:: tree (no suffix); add Generated module layout section explaining the sentinel; update view, extension const, and register_types paths. - migration-from-prost.md: replace per-file include! with include_proto!; add view import path. - migration-from-protobuf.md: replace include! with include_proto!; rewrite oneof section for __buffa::oneof:: paths. - DESIGN.md already updated by #62 — no changes.
The headline 0.4.0 feature was missing from the user guide. Adds a "Encoding from views" subsection under Zero-copy views with a build-from-borrows example and the proxy-fast-path pattern.
- buffa/src/lib.rs: bump no_std example version "0.3" -> "0.4" - docs/guide.md: drop stale __buffa_cached_size from reserved-prefix example list (field removed in #22); use __buffa_phantom instead
85c6009 to
94e0350
Compare
asacamano
approved these changes
Apr 27, 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.
Release prep for v0.4.0.
What's in this PR
0.3.0→0.4.0, all intra-workspace dep pins,README.md/lib.rsversion refs.[0.4.0]section curating the breaking changes and additions from codegen: namespace ancillary types under buffa_:: sentinel + per-package stitcher #62, view: opt-in ViewEncode for serializing from borrowed fields #55, Externalize size cache: remove __buffa_cached_size from generated structs #22, Drop unsafe from DefaultInstance and DefaultViewInstance traits #70, Make DefaultViewInstance safe via compiler-checked covariance #71, buffa-types: back Any.value with bytes::Bytes for refcount-bump clone #51, fix: always fully-qualify Option to prevent cross-file prelude shadowing #67, fix: qualify Option in nested scopes to prevent prelude shadowing (#36) #39, Sanitize oneof variant names that PascalCase to reserved Rust idents #48, Add Enumeration::values() static slice for variant iteration #49, Add enum_attribute API for enum-only Rust attributes #50, fix: add missing text and allow_message_set params to protoc plugin #58.docs/guide.md—__buffa::module-layout section, rewritten Oneofs section (no suffix,__buffa::oneof::tree),include_proto!examples, extension/register_typespaths, ViewEncode "Encoding from views" section, and theInt64Rangecustom-type example updated forSizeCache.docs/migration-from-{prost,protobuf}.md—__buffa::paths andSizeCache-threadedcompute_size/write_tosignatures.Breaking changes summary (full detail in CHANGELOG)
pkg::__buffa::{view, oneof, ext};include_proto!consumer patterncompute_size/write_totake&mut SizeCache;cached_size()and__buffa_cached_sizeremovedDefaultInstance/DefaultViewInstanceno longerunsafe;HasDefaultViewInstanceremovedAny.valueisbytes::BytesCodeGenError::{OneofNameConflict, ViewNameConflict}removedAfter merge
v0.4.0on the merge commitpublish-crates.yml(idempotent; 7 crates)connect-rustneeds__buffa::path updates andSizeCache-threadedcompute_size/write_tobefore it can pick up buffa 0.4Review focus
The CHANGELOG
[0.4.0]migration table and thedocs/guide.mdcustom-type / Oneofs sections.