Skip to content

refactor!: unify wire format to pure bincode, remove prost/protobuf envelope - #13

Merged
ae2rs merged 1 commit into
mainfrom
refactor/unify-wire-format-pure-bincode
May 26, 2026
Merged

refactor!: unify wire format to pure bincode, remove prost/protobuf envelope#13
ae2rs merged 1 commit into
mainfrom
refactor/unify-wire-format-pure-bincode

Conversation

@ae2rs

@ae2rs ae2rs commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace prost/protobuf wire format (v1) with pure bincode (v2) — defines WireEnvelope + WireFrame structs with bincode::Encode/bincode::Decode derives, eliminating the protobuf code-generation step entirely
  • Remove prost, tonic-build, build.rs, and aerro.v1.proto — cuts 3 dependencies (prost, tonic-build, protoc system dep) from the build graph
  • Remove protoc from CIarduino/setup-protoc@v3 step removed from both ci.yml and release.yml
  • Rename DecodeError::ProstDecodeError::Wire and rename bench functions from aerro_prostaerro_bincode
  • Bump workspace version 0.8.0 → 0.9.0 (breaking wire format change)

Breaking changes

Before After
Wire envelope v1 (prost/protobuf) Wire envelope v2 (bincode)
DecodeError::Prost(String) DecodeError::Wire(String)
tonic feature "prost" required tonic feature "prost" removed
protoc required at build time No system dependencies

Migration

  • Services must be upgraded together — v1 and v2 wire formats are not interoperable
  • Users of #[derive(Aerro)] need no code changes — the wire format change is transparent
  • Users matching on DecodeError::Prost must rename to DecodeError::Wire
  • protoc no longer needs to be installed in CI or dev environments

Test plan

  • All 51 existing tests pass (unit, integration, UI, doc-tests)
  • Clippy clean with default and no-default features
  • Roundtrip tests verify bincode encode → decode preserves all fields
  • Elision, redaction, and frame-dropping tests updated for new wire types
  • Integration test proto_gen.rs rewritten for bincode envelope

🤖 Generated with Claude Code

…nvelope

Replace the prost-generated protobuf envelope (v1) with a pure bincode
wire format (v2) using derive-based WireEnvelope/WireFrame structs.

BREAKING CHANGE: Wire format version bumped from 1 to 2. Services must
be upgraded together — v1 (prost) and v2 (bincode) are not
interoperable. The `DecodeError::Prost` variant is renamed to `Wire`.

Changes:
- Define WireEnvelope + WireFrame with bincode::Encode/Decode derives
- Rewrite encode.rs/decode.rs to use bincode serialization directly
- Remove prost, tonic-build, build.rs, and aerro.v1.proto
- Remove protoc setup from CI workflows (no longer needed)
- Remove tonic "prost" feature flag from workspace dependencies
- Rename DecodeError::Prost → DecodeError::Wire
- Bump workspace version 0.8.0 → 0.9.0

Migration: upgrade all services simultaneously. No code changes needed
for users of the `#[derive(Aerro)]` macro — the wire format change is
transparent. Users matching on `DecodeError::Prost` must rename to
`DecodeError::Wire`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ae2rs
ae2rs merged commit 7159d07 into main May 26, 2026
4 checks passed
@ae2rs
ae2rs deleted the refactor/unify-wire-format-pure-bincode branch May 26, 2026 09:35
ae2rs added a commit that referenced this pull request May 26, 2026
…nvelope (#13)

Replace the prost-generated protobuf envelope (v1) with a pure bincode
wire format (v2) using derive-based WireEnvelope/WireFrame structs.

BREAKING CHANGE: Wire format version bumped from 1 to 2. Services must
be upgraded together — v1 (prost) and v2 (bincode) are not
interoperable. The `DecodeError::Prost` variant is renamed to `Wire`.

Changes:
- Define WireEnvelope + WireFrame with bincode::Encode/Decode derives
- Rewrite encode.rs/decode.rs to use bincode serialization directly
- Remove prost, tonic-build, build.rs, and aerro.v1.proto
- Remove protoc setup from CI workflows (no longer needed)
- Remove tonic "prost" feature flag from workspace dependencies
- Rename DecodeError::Prost → DecodeError::Wire
- Bump workspace version 0.8.0 → 0.9.0

Migration: upgrade all services simultaneously. No code changes needed
for users of the `#[derive(Aerro)]` macro — the wire format change is
transparent. Users matching on `DecodeError::Prost` must rename to
`DecodeError::Wire`.

Co-authored-by: ae2rs <ae2rs@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant