Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Dec 15, 2025

This PR contains the following updates:

Package Type Update Change
bilrost-derive workspace.dependencies minor 0.1010.20.1014.0

Release Notes

mumbleskates/bilrost (bilrost-derive)

v0.1014.1

Compare Source

New features
  • Allows intercompatibility with hashbrown 0.16

v0.1014.0

Compare Source

Breaking changes

There should be no breaking changes this release.

New features
  • Headline feature: Added the "message" attribute for oneof variants which
    enables oneof variants with any number of fields, encoding a sub-message as
    the variant's value without a second struct type to nest as a value.
  • Added support for the #[bilrost(reserved_tags(..))] attribute for the
    Oneof derive macro as well.
  • The Enumeration derive macro now supports Tuple() and Struct { }
    variants as long as they have no fields.
  • Added the "empty" attribute for oneof variants which allows explicitly marking
    empty variants.
  • Added support for Range<T> and RangeInclusive<T>, which encode and decode
    the same as (start, end) tuples.
  • Added support for the NonZero integer types, which are considered non-empty.
    These types must be wrapped in an Option or another container to appear in
    a message field.
Fixes
  • Don't imply that that general encodings may output 32 & 64 bit integers in a
    fixed-size representation in the readme documentation.
Cleanups
  • Major cleanups to most parts of the derive macro codegen implementation.
  • Various cleanups to string formatting code.

v0.1013.0

Compare Source

Breaking changes
For normal use
  • There should be no breaking changes. Any breaking changes may be reported as
    bugs and will be either fixed or documented in a patch release.
Advanced usage

Since 0.1012:

  • The bilrost::encoding::General encoding type has become a specific
    definition of a generic type, bilrost::encoding::GeneralGeneric<P>. Anything
    that implements encoders specifically for General or sets up encoding
    delegation for it may find that it no longer works inside nested values or in
    Oneof variants, since those values are encoded with a specific definition of
    the generic. If this is a problem, it can be solved one of two ways:
    1. explicitly annotate the encodings of the values that aren't working with
      the "general" encoding, overriding "general_packed"
    2. change the implementation or delegation to be not just for General, but
      for GeneralGeneric<P> for all const P: u8 instead; this will include
      both of the general encodings.
  • Renamed OpaqueMessage::{borrowed, convert_to_owned} to to_borrowed and
    into_owned, and OpaqueValue::convert_to_owned to into_owned to better
    match common naming conventions
  • The "fixed" encoding no longer automatically covers Vec<T> by delegating to
    "unpacked" when T is supported by the "fixed" encoding.
  • Virtually all the internal encoding traits have changed to better facilitate
    second party implementations for third-party types.
    • Each updated trait's form has changed from impl Encoder<E> for T to
      impl Encoder<E, T> for ().

Since 0.1013.0-rc.4:

  • Removed the new_proxy method from the Proxiable trait; the Proxy type
    that your type will be encoded as must have ForOverwrite in the encoding E
    that is used to encode it instead.
New features
For normal use
  • The Message trait now has the methods new_empty, message_is_empty, and
    clear_message. These provide the same functionality that was available by
    using EmptyState from the advanced-usage space traits previously, but that
    trait is no longer available to dyn messages in a usable form.
  • There is a new encoding available, general_packed (exported as
    bilrost::encoding::GeneralPacked) that defaults to packed representations
    rather than unpacked for its supported collection types.
    • general_packed is now the implicit default when no encoding is specified
      for Oneof variants, as well as the default inner encoding for values
      nested inside packed, unpacked, and map values.
    • In all other ways, general_packed should behave the same as general.
    • This means that many new types can now be encoded without specifying an
      explicit field encoding. This can be very helpful as the compiler error
      messages from the missing trait are unlikely to ever be very good.
  • Ignored fields, via the #[bilrost(ignore)] attr, no longer always require
    the whole message struct to implement Default; when the message struct is
    given the #[bilrost(default_per_field)] attr, only the types of the
    individually ignored fields need to implement Default.
Advanced usage
  • Added (or publicized) some new macros for facilitating advanced usage:
    • encoding_implemented_via_value_encoding! -- implements encoding/decoding
      for message fields for all types where encoding/decoding of values is
      available and the EmptyState trait is implemented. Recommended for
      virtually all encodings.
    • encoding_uses_base_empty_state! -- delegates all EmptyState and
      ForOverwrite implementations to the "base" implementations used by the
      encodings in the bilrost crate. See the "proxy_own_type" example.
    • implement_core_empty_state_rules! -- adds some covering implementations
      of the EmptyState and ForOverwrite traits for a custom encoding intended
      to be used for types not owned by your crate. See the
      "proxy_third_party_type" example.
  • The Sized constraints have been relaxed on the Encoder, ValueEncoder,
    and WireTyped traits.
  • Added some examples to the crate demonstrating newly-possible advanced usage
    patterns for implementing encoding & decoding types not naturally supported by
    the bilrost crate, for cases when those types are and are not owned by your
    own crate.
Fixes
  • The empty_state_via_default! macro no longer produces malformed output when
    used with a generic.

v0.1012.3

Compare Source

Fixes
  • Loosened some erroneous constraints on Option<T> that prevented borrow-only
    types from being decodable when wrapped in Option.

v0.1012.2

Compare Source

Fixes
  • BUGFIX: Message implementations derived for oneof types no longer fail to skip
    the data in unknown fields that the mssage also contains.

v0.1012.1

Compare Source

Fixes
  • Internals macros: Fixed the empty_state_via_for_overwrite macro, which was
    incompletely implemented and still referenced the Default trait.

v0.1012.0

Compare Source

Breaking changes
  • This release includes a major overhaul of encoding and decoding traits for
    the library.

    Capability Old trait New trait
    encoding Message Message
    relaxed decoding (owned) Message OwnedMessage
    distinguished decoding (owned) DistinguishedMessage DistinguishedOwnedMessage
    relaxed decoding (borrowed) (new!) BorrowedMessage<'a>
    distinguished decoding (borrowed) (new!) DistinguishedBorrowedMessage<'a>

    For very simple usage of the bilrost library, this will now probably mean
    importing both Message and OwnedMessage traits to have the desired
    functionality in scope.

  • The DistinguishedMessage and DistinguishedOneof traits & derives are gone
    as well; rather than deriving multiple traits, simply add a
    #[bilrost(distinguished)] attribute to the type being derived from:

    Old derives New derives
    Message, DistinguishedMessage Message with #[bilrost(distinguished)] on the struct
    Oneof, DistinguishedOneof Oneof with #[bilrost(distinguished)] on the enum
    all of the above Message & Oneof with #[bilrost(distinguished)] on the enum
    just using Message, Oneof, & Enumeration (no change)
New features
  • It is now possible to do borrowed zero-copy decoding, which is enabled by
    default and available in the derive macros. This decodes from a &[u8] slice
    with lifetime into messages that may reference its data.
    • This adds support for the types &str, &[u8], &[u8; N], and
      &bstr::BStr; these types can appear in message fields, oneof fields, and
      nested in other containers just like any other type. This also adds
      guaranteed behavior for Cow for these borrowed types also decodes as
      Cow::Borrowed(&..) when decoding from borrowed data.
    • With this addition, there are now two different ways to have zero-copy
      decoding that each work slightly differently:
      1. Decode directly from bytes::Bytes and into fields of type
        bytes::Bytes or bytestring::Bytestring. This yields owned, refcounted
        handles to the original data.
      2. Decode borrowed from &[u8] and into fields of type &str, &[u8],
        &[u8; N], or &bstr::BStr. This yields data borrowed for a lifetime at
        very low cost, protected by the borrow checker rather than a refcount.
  • Derive macros are now simpler to use, so now deriving all encoding and
    decoding impls for messages and oneofs is done only with Message and
    Oneof, and distinguished implementations are switched on and off by
    attribute.
  • Opened the gates for crate documentation in the encoding module as the crate
    is getting closer to what could become a stable release.
  • Added From<Vec<u8>> and From<Box<[u8]>> impls for ReverseBuffer.
  • Added new forms of ranges in the reserved_tags attribute: 5.. and ..=5.
  • EXPERIMENTAL: Made public a couple macros and the proxying traits &
    encoding type; see encoding::{Proxied, Proxiable} for details.
    • These can be used even to encode third-party types foreign to both your own
      crate and to bilrost (via type-tagged impls) and completely break the
      guarantees of the bilrost library. I do my best, but correctness is in
      your hands!
Fixes
  • Internals: It should no longer be possible for restricted and canonical
    message decoding modes to return data or canonicity that is less than the
    restriction level that was specified, if a decoding implementation returns a
    lower canonicity but forgets to check against the restriction in the context.
    The worst that should happen is that the error is raised late, at the end of
    decoding, when it is too late to add information about the location of the
    error. There are also debug-only assertions that test that this should never
    happen, and explanatory documentation about exactly when a Canonicity should
    be checked against the restricted context on RestrictedDecodeContext::check.
    • It's unlikely this should change any behavior as formerly the canonicity was
      checked very aggressively in all existing implementations, far more often
      than it had to be.
Cleanups
  • Changed internal and external phrasing from "expedient" encoding to "relaxed".
  • More reorganization and file cleanups, splitting up some large files into more
    modules etc.
  • Cleaned up some docs in the encoding module.
  • Improved type coverage in the fuzz testing modules and gave the message
    definitions fixed field tags so existing fuzzing corpora will be maximally
    useful.
  • Internals: Ironed out a lingering annoyance with the field decoding APIs; the
    Decoder traits no longer accept a duplicated boolean argument that
    mandates returning an error when it is true. Instead, message implementations
    that have defined fields are responsible for creating the
    UnexpectedlyRepeated decoding error themselves.

v0.1011.2

Compare Source

Fixes
  • BUGFIX: Message implementations derived for oneof types no longer fail to skip
    the data in unknown fields that the mssage also contains.

v0.1011.1

Compare Source

Fixes
  • Oneof enums can now implement distinguished decoding even when one or more of
    their variants has a type with no "empty" state. 🎊

v0.1011.0

Compare Source

Breaking changes
  • The (unstable) internal encoding traits & types continue to evolve.
    • Oneof traits now encode and decode slightly differently and the traits
      bearing an empty state now have special responsibility for guarding against
      value duplication and recording error locations.
    • Distinguished encoding traits now use a different context type,
      RestrictedDecodeContext, which restricts the minimum tolerated canonicity
      and allows for early exits and detailed errors about the location of
      non-canonical data problems.
    • DecodeContext now has public method visibility.
New features
  • Added support for core::time::Duration and std::time::SystemTime.
  • Added 3rd party type support for the bstr crate and its BString type,
    which is a wrapper around Vec<u8> that acts like text but does not guarantee
    UTF-8 and does not require any validation.
  • Added 3rd party type support for the chrono and time crates and most of
    their important types, available through new crate features.
  • Oneof types can now be wrapped in Box (multiple times even, and either
    side of Option if you really want.)
  • DistinguishedMessage: added "restricted" and "canonical" decoding methods
    alongside the existing "distinguished" ones, allowing decoding to stop early
    on canonicity errors.
Fixes
  • Rectify an ambiguous usage of PartialEq that could potentially cause
    compilation failures when supported types in the program support cross-type
    equality.
  • bilrost-derive: simplify some codegen to remove a needless let mut in
    derived decoding implementations.
Cleanups
  • bilrost-types: parsing fractional seconds with more than 9 digits now
    simply truncates instead of erring.
  • bilrost-types: parsing timestamps with "unknown local offset" timezones
    ("-00:00") is now tolerated, since the timezone information is discarded
    anyway.
  • bilrost-types: improved fuzzing binaries for datetime parsing.
  • New keywords and categories have been added to the crate metadata.
  • Various small cleanups to the readme and to the code as rustfmt and clippy
    develop more and stronger opinions.
  • Major reorganization of type implementations, especially of common value-trait
    implementations and third-party types. All that code is now filed under
    encoding::type_support and conditionally enabled at the file level. Impls
    for primitive and core types in the builtin encoders are still in those
    encoders' modules, but the value_traits module now contains only traits and
    macros and all conditionally-enabled code has been moved into type_support.
  • A new fuzzer binary is available specifically for the newer types which have
    the newer, slightly more abstract encoding paths. These fuzzers are typically
    run in the order of hundreds to thousands of CPU hours per significant change,
    and are available for you to run as well.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies External dependencies label Dec 15, 2025
@renovate
Copy link
Contributor Author

renovate bot commented Dec 15, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path Cargo.toml --package bilrost-derive@0.1010.2 --precise 0.1014.1
    Updating crates.io index
error: failed to select a version for the requirement `bilrost-derive = "=0.1010.2"`
candidate versions found which didn't match: 0.1014.1
location searched: crates.io index
required by package `bilrost v0.1010.2`
    ... which satisfies dependency `bilrost = "^0.1010.2"` of package `pdf-sign-core v0.2.0 (/tmp/renovate/repos/github/0x77dev/pdf-sign/crates/core)`

@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@renovate renovate bot force-pushed the renovate/bilrost-derive-0.x branch 4 times, most recently from ead30bd to 104ed8e Compare December 22, 2025 17:50
@renovate renovate bot force-pushed the renovate/bilrost-derive-0.x branch 3 times, most recently from 66b8f65 to 46e0830 Compare December 29, 2025 05:48
@renovate renovate bot force-pushed the renovate/bilrost-derive-0.x branch from 46e0830 to 4ec8cdc Compare December 30, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies External dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant