Skip to content

v0.1005.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@mumbleskates mumbleskates released this 06 Apr 22:59
· 278 commits to bilrost since this release

v0.1005.0

Breaking changes

  • The (unstable) internal encoding traits continue to evolve, this time to
    support prepend-encoding.

New features

  • Added prepend-encoding: messages can be encoded to a prepend-only buffer, with
    .prepend(reverse_buf) or .encode_fast(). This encoding method writes
    messages in reverse, avoiding any need to "look ahead" in order to encode the
    correct length for data that is not yet written. This enables writing an
    arbitrarily nested message without visiting any field more than once, removing
    a quadratic hazard and general inefficiency in the encoding path.
  • New reserved_tags attribute on messages to prevent tags from being used,
    even by accident.
  • Both the new reserved_tags and the old oneof attributes can now specify
    inclusive ranges of tag numbers instead of only single tags. For now, in
    oneof this is limited to 100 tags per range because more than that is just
    too many.
  • bilrost-derive, which contains the derive macros, is now no_std. This
    doesn't really change what it's capable of at all but it does make it easier
    to prove it doesn't accidentally preclude using std.

Fixes

  • Explicitly instantiate and invoke the const-time assertions that check the
    tags match between a Oneof type and its inclusion in a Message. Before this
    the asserts probably would never run.

Cleanups

  • The "opaque" message types are now always available, and no longer require a
    dependency or a crate feature. The "opaque" feature will be removed in a
    future version.
  • The "derived message tests" have been moved from a binary with required
    features to an integration test. The "derive" feature and the "bilrost-derive"
    crate dependency are now always enabled in tests to support this.