Skip to content

Commit fcb4901

Browse files
authored
Prepare v0.3.0 release (#24)
Release-prep changes for v0.3.0: version bump, changelog, docs, and gitignore. ## Changes - **Version bump** `0.2.0` → `0.3.0` in workspace `Cargo.toml` and all path-dependency pins (`buffa-build`, `buffa-codegen`, `protoc-gen-buffa`, `protoc-gen-buffa-packaging`). - **CHANGELOG.md**: cut the `[0.3.0]` section from `[Unreleased]` and added entries for #7 (proto comments → rustdoc), #8 (`buffa-descriptor` crate), #15 (`clippy::use_self`), #17 (write-if-changed), #20 (synthetic-oneof collision fix), #21 (`MAX_FIELD_NUMBER`), plus a placeholder `#TBD` for the rustdoc sanitization fix. The extensions/textproto/TypeRegistry entries were already present. - **README.md**: updated version pin example to `0.3`; reworded the reflection bullet now that `buffa-descriptor` exists as a published crate. - **docs/guide.md**: updated all `0.1`/`v0.2.0` version strings to `0.3`/`v0.3.0`. - **.gitignore**: added `benchmarks/datasets/hyperpb/`. ## Dependencies This PR should land **after** the rustdoc sanitization fix (PR #25, merged) so the v0.3.0 tag has a working docs.rs build. Once that PR merges, the `#TBD` placeholder in CHANGELOG.md should be replaced with its real number before this is merged. ## Publish notes `buffa-descriptor` is a **new** crate in this release. crates.io has no pending-publisher mechanism, so its first publish via the tag-triggered `publish-crates.yml` workflow will fail OIDC auth. Set `CARGO_REGISTRY_TOKEN` in the repo secrets before tagging (or rerun the failed job after setting it — the workflow is idempotent), then configure Trusted Publishing on crates.io for subsequent releases. ## Checklist - [x] `task lint` clean - [x] `task test` passing - [x] `task lint-md` clean - [x] `cargo metadata` shows all workspace crates at 0.3.0 - [x] Replace `#TBD` in CHANGELOG.md with the rustdoc-fix PR number
1 parent 48e9426 commit fcb4901

File tree

20 files changed

+258
-213
lines changed

20 files changed

+258
-213
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Release protoc plugins
22

3-
# Triggered by pushing a tag like v0.2.0.
3+
# Triggered by pushing a tag matching v*.
44
# Builds protoc-gen-buffa and protoc-gen-buffa-packaging for
55
# Linux (x86_64, aarch64), macOS (x86_64, aarch64), and Windows (x86_64).
66
# Creates a GitHub release with the binaries, SHA-256 checksums,

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ conformance/target-nostd/
77
target/
88
benchmarks/results/
99
benchmarks/charts/__pycache__/
10+
benchmarks/datasets/hyperpb/
1011

1112
# Stress test output
1213
stress/googleapis/out/

CHANGELOG.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66

77
## [Unreleased]
88

9+
## [0.3.0] - 2026-04-01
10+
911
### Breaking changes
1012

1113
- **`Extension::new(number)``Extension::new(number, extendee)`.** Same for
@@ -61,6 +63,39 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6163
text-format conformance suite (883/883).
6264
- **Conformance:** `TestAllTypesEdition2023` enabled; binary+JSON 5539 → 5549
6365
passing (std). Text format suite 0 → 883 passing (was entirely skipped).
66+
- **`buffa-descriptor` crate**`FileDescriptorProto` and friends are now in a
67+
standalone crate that depends only on `buffa`, so descriptor types are usable
68+
without pulling in `quote`/`syn`/`prettyplease`. `buffa-codegen` re-exports
69+
the module so existing `buffa_codegen::generated::*` paths still resolve.
70+
([#8](https://github.com/anthropics/buffa/pull/8))
71+
- **Proto source comments → rustdoc.** Comments from `.proto` files are now
72+
emitted as `///` doc comments on generated structs, fields, enums, variants,
73+
and view types. Requires `--include_source_info` (set automatically by
74+
`buffa-build` and the protoc plugins).
75+
([#7](https://github.com/anthropics/buffa/pull/7))
76+
- **`buffa::encoding::MAX_FIELD_NUMBER`** constant (`(1 << 29) - 1`), replacing
77+
the magic number at all call sites.
78+
([#21](https://github.com/anthropics/buffa/pull/21))
79+
80+
### Changed
81+
82+
- **`buffa-build` skips writing unchanged outputs**, avoiding mtime bumps that
83+
trigger needless downstream recompilation.
84+
([#17](https://github.com/anthropics/buffa/pull/17))
85+
- **Generated code emits `Self`** in `impl` blocks instead of repeating the
86+
type name, so consumer crates that enable `clippy::use_self` get clean
87+
output. ([#15](https://github.com/anthropics/buffa/pull/15))
88+
89+
### Fixed
90+
91+
- **Codegen no longer reports a false name collision** between a nested type
92+
and a proto3 `optional` field whose synthetic oneof PascalCases to the same
93+
name. ([#20](https://github.com/anthropics/buffa/pull/20),
94+
fixes [#12](https://github.com/anthropics/buffa/issues/12))
95+
- **Generated rustdoc no longer breaks on proto comments** containing
96+
`[foo][]` reference-style links or bare URLs — these are now escaped so
97+
rustdoc treats them as literal text.
98+
([#25](https://github.com/anthropics/buffa/pull/25))
6499

65100
## [0.2.0] - 2026-03-16
66101

@@ -187,6 +222,7 @@ This release publishes:
187222

188223
MSRV: Rust 1.85.
189224

190-
[Unreleased]: https://github.com/anthropics/buffa/compare/v0.2.0...HEAD
225+
[Unreleased]: https://github.com/anthropics/buffa/compare/v0.3.0...HEAD
226+
[0.3.0]: https://github.com/anthropics/buffa/compare/v0.2.0...v0.3.0
191227
[0.2.0]: https://github.com/anthropics/buffa/compare/v0.1.0...v0.2.0
192228
[0.1.0]: https://github.com/anthropics/buffa/releases/tag/v0.1.0

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exclude = [
2222
]
2323

2424
[workspace.package]
25-
version = "0.2.0"
25+
version = "0.3.0"
2626
edition = "2021"
2727
rust-version = "1.85"
2828
license = "Apache-2.0"
@@ -31,12 +31,12 @@ keywords = ["protobuf", "protocol-buffers", "serialization", "no-std", "editions
3131
categories = ["encoding", "no-std"]
3232

3333
[workspace.dependencies]
34-
buffa = { path = "buffa", version = "0.2.0", default-features = false }
35-
buffa-types = { path = "buffa-types", version = "0.2.0" }
36-
buffa-descriptor = { path = "buffa-descriptor", version = "0.2.0" }
37-
buffa-codegen = { path = "buffa-codegen", version = "0.2.0" }
38-
buffa-build = { path = "buffa-build", version = "0.2.0" }
39-
buffa-test = { path = "buffa-test", version = "0.2.0" }
34+
buffa = { path = "buffa", version = "0.3.0", default-features = false }
35+
buffa-types = { path = "buffa-types", version = "0.3.0" }
36+
buffa-descriptor = { path = "buffa-descriptor", version = "0.3.0" }
37+
buffa-codegen = { path = "buffa-codegen", version = "0.3.0" }
38+
buffa-build = { path = "buffa-build", version = "0.3.0" }
39+
buffa-test = { path = "buffa-test", version = "0.3.0" }
4040
base64 = { version = "0.22", default-features = false, features = ["alloc"] }
4141
bytes = { version = "1", default-features = false }
4242
hashbrown = { version = "0.15", default-features = false, features = ["default-hasher"] }

README.md

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# buffa
22

3+
[![crates.io](https://img.shields.io/crates/v/buffa.svg)](https://crates.io/crates/buffa)
4+
[![docs.rs](https://img.shields.io/docsrs/buffa)](https://docs.rs/buffa)
5+
[![CI](https://github.com/anthropics/buffa/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/anthropics/buffa/actions/workflows/ci.yml)
6+
[![MSRV](https://img.shields.io/crates/msrv/buffa)](Cargo.toml)
7+
[![deps.rs](https://deps.rs/repo/github/anthropics/buffa/status.svg)](https://deps.rs/repo/github/anthropics/buffa)
8+
[![no_std](https://img.shields.io/badge/no__std-compatible-blue)](docs/guide.md#no_std-usage)
9+
[![License](https://img.shields.io/crates/l/buffa)](LICENSE)
10+
311
A pure-Rust Protocol Buffers implementation with first-class [protobuf editions](https://protobuf.dev/editions/overview/) support. Written by Claude ❣️
412

513
## Why buffa?
@@ -36,7 +44,7 @@ buffa supports **binary**, **JSON**, and **text** protobuf encodings:
3644

3745
These are intentionally out of scope:
3846

39-
- **Runtime reflection** (`DynamicMessage`, descriptor-driven introspection) — not planned for 0.1. Buffa is a codegen-first library; if you need schema-agnostic processing, consider preserving unknown fields or using `Any`.
47+
- **Runtime reflection** (`DynamicMessage`, descriptor-driven introspection) — planned for a future release. The descriptor types are now available in `buffa-descriptor` as a first step. Buffa remains a codegen-first library; if you need schema-agnostic processing today, consider preserving unknown fields or using `Any`.
4048
- **Proto2 optional-field getter methods**`[default = X]` on `optional` fields does not generate `fn field_name(&self) -> T` unwrap-to-default accessors. Custom defaults are applied only to `required` fields via `impl Default`. Optional fields are `Option<T>`; use pattern matching or `.unwrap_or(X)`.
4149
- **Scoped `JsonParseOptions` in `no_std`** — serde's `Deserialize` trait has no context parameter, so runtime options must be passed through ambient state. In `std` builds, [`with_json_parse_options`] provides per-closure, per-thread scoping via a thread-local. In `no_std` builds, [`set_global_json_parse_options`] provides process-wide set-once configuration via a global atomic. The two APIs are mutually exclusive. The `no_std` global supports singular-enum accept-with-default but not repeated/map container filtering (which requires scoped strict-mode override).
4250

@@ -52,7 +60,7 @@ These are gaps we intend to address in future releases:
5260

5361
## Semver and API stability
5462

55-
Buffa is pre-1.0. We follow the [Rust community convention](https://doc.rust-lang.org/cargo/reference/semver.html) for 0.x crates: breaking changes increment the **minor** version (0.1.x → 0.2.0), additive changes increment the **patch** version (0.1.0 → 0.1.1). Pin to a minor version (`buffa = "0.1"`) to avoid surprises.
63+
Buffa is pre-1.0. We follow the [Rust community convention](https://doc.rust-lang.org/cargo/reference/semver.html) for 0.x crates: breaking changes increment the **minor** version (0.1.x → 0.2.0), additive changes increment the **patch** version (0.1.0 → 0.1.1). Pin to a minor version (`buffa = "0.3"`) to avoid surprises.
5664

5765
The generated code API (struct shapes, `Message` trait, `MessageView` trait, `EnumValue`, `MessageField`) is considered the primary stability surface. Internal helper modules marked `#[doc(hidden)]` (`__private`, `__buffa_*` fields) may change at any time.
5866

@@ -146,12 +154,12 @@ Throughput comparison across four representative message types, measured on an I
146154

147155
<details><summary>Raw data (MiB/s)</summary>
148156

149-
| Message | buffa | buffa (view) | prost | protobufv4 | Go |
150-
|---------|------:|-------------:|------:|------------:|---:|
151-
| ApiResponse | 762 | 1,245 (+63%) | 777 (+2%) | 720 (−5%) | 277 (−64%) |
152-
| LogRecord | 689 | 1,772 (+157%) | 692 (+0%) | 882 (+28%) | 251 (−64%) |
153-
| AnalyticsEvent | 188 | 307 (+63%) | 258 (+37%) | 364 (+93%) | 92 (−51%) |
154-
| GoogleMessage1 | 801 | 1,093 (+36%) | 1,001 (+25%) | 659 (−18%) | 351 (−56%) |
157+
| Message | buffa | buffa (view) | prost | protobuf-v4 | Go |
158+
|---------|------:|------:|------:|------:|------:|
159+
| ApiResponse | 834 | 1,413 (+69%) | 766 (−8%) | 712 (−15%) | 270 (−68%) |
160+
| LogRecord | 768 | 1,921 (+150%) | 681 (−11%) | 873 (+14%) | 249 (−68%) |
161+
| AnalyticsEvent | 198 | 316 (+60%) | 252 (+28%) | 358 (+81%) | 91 (−54%) |
162+
| GoogleMessage1 | 1,024 | 1,322 (+29%) | 998 (−3%) | 648 (−37%) | 344 (−66%) |
155163

156164
</details>
157165

@@ -161,12 +169,12 @@ Throughput comparison across four representative message types, measured on an I
161169

162170
<details><summary>Raw data (MiB/s)</summary>
163171

164-
| Message | buffa | prost | protobufv4 | Go |
165-
|---------|------:|------:|------------:|---:|
166-
| ApiResponse | 2,637 | 1,755 (−33%) | 1,050 (−60%) | 570 (−78%) |
167-
| LogRecord | 4,149 | 3,163 (−24%) | 1,717 (−59%) | 309 (−93%) |
168-
| AnalyticsEvent | 671 | 369 (−45%) | 516 (−23%) | 162 (−76%) |
169-
| GoogleMessage1 | 2,543 | 1,866 (−27%) | 882 (−65%) | 366 (−86%) |
172+
| Message | buffa | prost | protobuf-v4 | Go |
173+
|---------|------:|------:|------:|------:|
174+
| ApiResponse | 2,613 | 1,680 (−36%) | 1,049 (−60%) | 556 (−79%) |
175+
| LogRecord | 4,102 | 3,000 (−27%) | 1,666 (−59%) | 302 (−93%) |
176+
| AnalyticsEvent | 656 | 366 (−44%) | 511 (−22%) | 159 (−76%) |
177+
| GoogleMessage1 | 2,644 | 1,867 (−29%) | 872 (−67%) | 358 (−86%) |
170178

171179
</details>
172180

@@ -178,10 +186,10 @@ Throughput comparison across four representative message types, measured on an I
178186

179187
| Message | buffa | prost | Go |
180188
|---------|------:|------:|---:|
181-
| ApiResponse | 869 | 776 (−11%) | 119 (−86%) |
182-
| LogRecord | 1,335 | 1,099 (−18%) | 144 (−89%) |
183-
| AnalyticsEvent | 781 | 768 (−2%) | 52 (−93%) |
184-
| GoogleMessage1 | 1,047 | 840 (−20%) | 129 (−88%) |
189+
| ApiResponse | 867 | 805 (−7%) | 116 (−87%) |
190+
| LogRecord | 1,312 | 1,083 (−17%) | 140 (−89%) |
191+
| AnalyticsEvent | 777 | 758 (−2%) | 51 (−93%) |
192+
| GoogleMessage1 | 1,021 | 830 (−19%) | 128 (−88%) |
185193

186194
</details>
187195

@@ -193,10 +201,10 @@ Throughput comparison across four representative message types, measured on an I
193201

194202
| Message | buffa | prost | Go |
195203
|---------|------:|------:|---:|
196-
| ApiResponse | 721 | 299 (−59%) | 71 (−90%) |
197-
| LogRecord | 780 | 694 (−11%) | 112 (−86%) |
198-
| AnalyticsEvent | 272 | 239 (−12%) | 47 (−83%) |
199-
| GoogleMessage1 | 635 | 253 (−60%) | 74 (−88%) |
204+
| ApiResponse | 718 | 293 (−59%) | 70 (−90%) |
205+
| LogRecord | 797 | 690 (−13%) | 110 (−86%) |
206+
| AnalyticsEvent | 265 | 235 (−11%) | 46 (−83%) |
207+
| GoogleMessage1 | 646 | 255 (−60%) | 73 (−89%) |
200208

201209
</details>
202210

benchmarks/charts/binary-decode.svg

Lines changed: 40 additions & 40 deletions
Loading

0 commit comments

Comments
 (0)