Skip to content

Releases

Release 0.1.3

Choose a tag to compare

@github-actions github-actions released this 18 Nov 23:37

[0.1.3] - 2026-11-18

Breaking changes

  • Upgrade dependencies, including the public foldhash 0.2, hashbrown 0.17 and jiff 1.0 integrations. Downstream code naming those external types must use these compatibility lines.

  • Require Rust 1.100 for every feature, pin development and release tooling to Rust 1.100.0, and verify Cargo lockfile format 4 during package validation.

  • Messages selected for cleanup (generate_zeroize(true) / zeroize=true, or zeroize_in), and the messages that contain them in the same generation step, no longer get a generated FooOwnedView wrapper or HasMessageView impl, as if they were also listed in borrowed_views_only_in. The wrapper's from_owned encoded the guarded message into ordinary, clonable Bytes that were never wiped. This also removes TimestampOwnedView, DurationOwnedView, ValueOwnedView, StructOwnedView and ListValueOwnedView from buffa_types::sensitive. To migrate, replace FooOwnedView::decode(bytes) with buffa::sensitive::GuardedOwnedView::<FooView<'static>>::decode(&bytes, &options) (or from_owned(&message, &options)), which returns GuardedViewError, and read fields through owner.view().field; the guarded owner is not Clone, does not hand out Bytes, and implements no JSON itself, so serialize owner.view() instead. Code that deliberately accepts unwiped backing storage can still use buffa::OwnedView::<FooView<'static>>. Generic code bounded on HasMessageView, such as RPC transport glue, no longer accepts these messages. A message whose guarded child is only selected in another generation step, or is an imported guarded type such as buffa_types::sensitive::Timestamp, keeps its wrapper unless you also select it with borrowed_views_only_in.

Added

  • Add opt-in, descriptor-checked native adapter generation through typed protobuf options, Rust configuration and bounded manifests. Closed selectors reject unspecified and unknown values, preserve explicit normalization and external registrations, and provide checked conversions. Payload selectors and borrowed byte/capability adapters preserve native signatures without changing portable generation.

  • DecodeOptions::clears_on_merge_error reports whether clear_on_merge_error is set. The additive with_clear_on_merge_error(bool) setter can enable or disable the policy, including on a cloned configuration. Documentation distinguishes logical clearing, memory wiping, and input-buffer consumption.

  • buffa_codegen::plugin_response_metadata() returns a CodeGeneratorResponse carrying buffa's supported plugin features and the EDITION_PROTO2 to EDITION_2024 edition range. Plugins built on buffa-codegen can merge it into each success and error response with ..plugin_response_metadata(); both generator binaries build their responses from it.

  • json_helpers::bytes::decode_into and bytes::max_decoded_len decode a base64 string once into a buffer the caller provides, without allocating and accepting exactly what bytes::deserialize accepts, so a ProtoBytesJson policy can keep decoded bytes only in storage it wipes. A failure reports a fixed message ("invalid base64" or "base64 output buffer too small") and never quotes a symbol or offset from the input.

Changed

  • Remove unused pbjson-types from the Prost benchmark and stop forcing the optional chrono feature through buffa-test. The buffa-types Chrono conversion API and its explicit-feature test coverage remain available.

  • DecodeContext records where the message being decoded ends. The default Message::merge_to_limit, Message::merge_length_delimited and the length-delimited decode entry points record it through the new DecodeContext::with_message_end, whose argument is the number of bytes that follow the message (the same limit that merge_to_limit takes), not the message's length. Hand-written code that decodes a different buffer, such as a copy or a decompressed payload, with a context it was given must call with_message_end(0) for a buffer that holds exactly the message, or start that buffer with Message::merge; otherwise a valid nested field near its end can be rejected with DecodeError::UnexpectedEof. A merge_to_limit override should record its limit the same way. A direct merge_to_limit caller can now get UnexpectedEof where it previously got Ok with the buffer past its limit.

  • json_helpers::bytes streams base64 output and decodes URL-safe input once. bytes::serialize writes the encoding through Serializer::collect_str instead of building a heap String of the encoded length first; the output is unchanged for serde_json and for any serializer whose collect_str matches its serialize_str. Decoding picks the standard or URL-safe alphabet from the first symbol only one of them has and decodes once, where URL-safe input was previously decoded with the standard alphabet first and then decoded again. Accepted inputs and decoded bytes are unchanged; the error text for invalid input that contains - or _ can differ.

  • buffa-yaml decodes string and container positions by the kind of the YAML scalar. Following the wrong-kind diagnostics change, these positions now read the input kind as ProtoJSON does. A YAML number or bool is no longer read as text in an optional, repeated, map or oneof string position or as a Timestamp, Duration or FieldMask, matching singular string fields; quote such scalars ("1.0"). An empty item or map value (- followed by a space, or key:) is now null, so it is rejected as a repeated string, a FieldMask, Struct, ListValue or Empty, or a message with a custom Deserialize (a oneof or extension range) in an element or map-value position, where it previously decoded as an empty value. An empty or comment-only YAML document still decodes as the default message, Struct, ListValue or Empty, through generated types and through DynamicMessageSeed. Explicit empty documents (---) are rejected at structural roots.

  • Execute guarded cleanup regression tests in actual wasm32-unknown-unknown modules on Node.js, in debug and optimized release builds. A pre-release allocation observer and deliberate residue controls cover vector slots, guarded collection growth and iteration, sensitive WKT strings and replacement, and map decode-error cleanup without changing application APIs.

  • Clarify the ordinary Struct cleanup guarantee and the compatibility decision to retain its public HashMap field. Add pre-deallocation regression observations for current key and nested String buffers, including spare capacity, with ordinary destruction as a negative control. Vacated table storage and previously released ordinary allocations remain outside the guarantee; secret-bearing trees require guarded ownership from ingestion. No runtime API or cleanup behavior changes.

  • Serialize guarded dynamic WKT views without constructing another owned payload tree. Preserve sorted object keys, last-duplicate semantics, representation JSON policies, diagnostics, and partial output on failure. Lazy lists validate all deferred wire children before writing and re-decode one child at a time to preserve error priority without retaining an aggregate decoded tree. Focused compatibility and allocation regressions cover eager, lazy, and owned view export.

  • Advance compatible dependency patches for bytes 1.12.2, Jiff 1.0.1, smallvec 1.16.6, zeroize 1.9.2 and the regex family across workspace and standalone lockfiles. Remove the unused normal fuzz dependency on the build-time generator, retaining its build dependency. Keep feature selections, the 0.1.3 crate family and Rust 1.100 support unchanged; retain the explicit full-capacity vector cleanup around the upgraded zeroization backend.

Fixed

  • buffa_descriptor::reflect::DynamicMessage::merge_with_options now honours DecodeOptions::clear_on_merge_error. Previously the option was silently ignored, so a failed merge, including an input over the size limit, left old and partially merged fields behind; the message is now reset to empty and keeps its descriptor. The dropped values are not wiped. DynamicMessage::merge always uses the default options, so it never clears.

  • DecodeOptions::reject_unknown_fields() now reaches DynamicMessage map entries: an unknown field inside a map entry, and an unknown closed-enum map value that a later known value replaces, are rejected as the generated decoders reject them. Under the default options these entries still decode, and an entry that ends with an unknown closed-enum value is still preserved as an unknown field.

  • A crate that hand-wrote impl ReflectElement or impl InspectElement for an enum it generates must remove that impl, since codegen now emits it (a duplicate fails with E0119). Generated enums get ReflectElement whenever reflection is on, and InspectElement whenever a cleanup generation has reflection on, whatever the enum's openness and the reflection mode. A generation that reaches an enum through extern_path and resolves it as closed, while its owner opened it with an open_enums_in rule or uses bridge reflection, types repeated and map-value fields as the bare enum and previously failed to compile. Regenerate the crate that owns the enum with this release. If you cannot regenerate the owning crate, add an open_enums_in rule for the enum to the referencing generation, so that its fields use EnumValue<E>; this also keeps unknown enum values instead of treating them as unknown fields.

  • protoc-gen-reallyme-buffa-packaging error responses now carry the advertised edition range as well as the supported features, so Buf reports the plugin's own configuration error instead of a protocol error about missing edition metadata.

  • A custom bytes, string or repeated field type that is not a Rust type path, such as _, (), [u8; 4], &'static [u8], impl Trait, is now rejected at generation time with `CodeGenErr...

Read more

Release 0.1.2

Choose a tag to compare

@github-actions github-actions released this 14 Nov 15:35

0.1.2 - 2026-11-14

Changed

  • Update the ProtoJSON base64 dependency to 0.23.1 with the same scalar engine and allocation-only features.

Release 0.1.1

Choose a tag to compare

@github-actions github-actions released this 14 Nov 02:14

0.1.1 - 2026-11-14

Security

  • Enum JSON value errors omit the input name or number. This covers generated enum values, enum field values and elements, registered enum extensions, and reflective enum values. The accepted values and lenient parsing behavior are unchanged. Regenerate existing bindings with the matching generator to update standalone enum deserialization.

  • Generated eager, lazy, and owned views and view oneofs honor skip_debug by formatting only a redaction marker with the type name. Preserved unknown fields still round-trip. Regenerate existing bindings to replace their old Debug implementations.

  • ProtoJSON decoding errors from map-key parsing, numeric conversion and range checks, base64 decoding, malformed Timestamp and Duration strings, and Any payload decoding omit rejected values. Accepted inputs are unchanged. Unknown-field diagnostics outside Any (including Serde-derived errors), parser and deserializer errors at other boundaries, and serialization errors are outside this change.

  • With the runtime zeroize feature enabled, standalone enum deserialization wipes string allocations transferred by Serde, including on rejection. Deserializers retain responsibility for their own buffers.

Added

  • borrowed_views_only_in omits standard owned wrappers and their HasMessageView bindings for selected messages and their containers. Eager and lazy borrowed views remain available.
  • buffa::sensitive::GuardedOwnedView holds eager views in private wiping wire storage. It encodes directly into that storage from owned messages and exposes only borrowed bytes and views.
  • DecodeOptions::clear_on_merge_error clears the entire destination if a merge fails. Generated guarded messages wipe fields through their existing Message::clear implementation.

Release 0.1.0

Choose a tag to compare

@github-actions github-actions released this 13 Nov 22:45

0.1.0 - 2026-11-13

First ReallyMe release. The upstream base is commit 104716922c66e21cf26895a2a5a2a42e6292f9d4; the reviewed fork integration is 332349be3bd40ae7a33588529ae31f9d8ccba040. This base is later than upstream tag v0.9.2.

Added

  • A fork-specific README with the original upstream README preserved, and a manually approved CI release pipeline that verifies source, full tests and package checksums before uploading.

  • Nine packages under the reallyme- prefix, with the existing Rust library names and exact dependencies within the package family.

  • Separate generator binaries, protoc-gen-reallyme-buffa and protoc-gen-reallyme-buffa-packaging, which report the fork version. Generated files identify the fork generator and its version.

  • Per-field custom bytes, string and repeated representations in the plugin, and opaque bounded decode hooks for bytes and strings.

  • Opt-in JSON policies for custom bytes and strings across owned messages, eager and lazy views, owned views, and supported collection positions. Invalid policy bindings fail closed.

  • An opt-in message cleanup profile with recursive cleanup, wipe-owning collections and view storage, streaming collection deserialization, borrowed inspection, and depth-bounded arbitrary generation.

  • Drop-compatible serde construction, cleanup-aware view-to-owned construction, and a separate guarded temporal/dynamic WKT family behind buffa-types/sensitive.

  • Unknown wire-field rejection independent of storage, including map entries and closed-enum values. Deferred lazy children are checked when materialized.

  • Generic lifecycle, allocation-release, reflection and integration regressions, including the additional tests submitted upstream.

Changed

  • Consumers select the fork packages through Cargo aliases and regenerate all schemas with this exact generator release. Published upstream 0.9.2 bindings are not a compatibility guarantee for this later source base.
  • A zero unknown-field allowance rejects discarded unknown fields as well as stored fields. Preserve the positive/default allowance when discarding without rejection is intended. Static extensions and custom descriptor options are unknown fields for this policy.
  • Release publication requires manual dispatch from current main; successful crate publication is followed by tag and GitHub release creation, following the ReallyMe SSI release sequence. Ordinary branch pushes do not publish packages or plugin binaries.

Limits

  • Cleanup and JSON policies require explicit configuration and suitable representation types. They do not erase parser, transport, foreign-runtime or compiler-generated copies outside their ownership.
  • Canonical wire checks, resource limits and transport ownership remain application responsibilities. Supported policy-map combinations and lazy-validation behavior are documented in the guarded-fields guide.