Skip to content

Releases: mumbleskates/bilrost

v0.1010.1

23 Oct 03:21
Compare
Choose a tag to compare
v0.1010.1 Pre-release
Pre-release

v0.1010.1

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.

v0.1010.0

11 Jul 06:40
Compare
Choose a tag to compare
v0.1010.0 Pre-release
Pre-release

v0.1010.0

New features

  • The optimization-controlling crate features have changed. There are now three
    features for each: from lowest to highest priority, "auto-feature",
    "prefer-no-feature", and "feature". This gives downstream crates the ability
    to turn a given optimization either on or off even if a library enables the
    "auto" feature. Only the "prefer-no-*" crate features are new.

Fixes

  • Fixed a crash, wrong results for dates in early year 1900, and tolerance of
    some incorrect inputs in bilrost_types::Timestamp's conversion from strings.

v0.1009.0

16 Jun 08:28
Compare
Choose a tag to compare
v0.1009.0 Pre-release
Pre-release

v0.1009.0

New features

  • Added encode_contiguous and encode_length_delimited_contiguous APIs to the
    Message trait which use the encode_fast prepend-encoding code path but
    measure the size first to always produce a contiguous buffer.
  • Added into_vec(self) to ReverseBuffer complete with a non-copying
    optimization when the buffer is full and contiguous, such as when it is
    produced by Message::encode_contiguous.

v0.1008.0

18 May 17:25
Compare
Choose a tag to compare
v0.1008.0 Pre-release
Pre-release

v0.1008.0

Breaking changes

  • The (unstable) internal encoding traits continue to evolve, now making checks
    for whether a value decoded in distinguished mode was empty optional at the
    value-decoder trait level. It is not always faster to check emptiness while
    decoding a value, and letting the distinguished value decoder implementation
    specify whether it takes responsibility for checking emptiness enables new
    type support like better nesting of never-empty types as described below.

Fixes

  • Enumerations that do not have a defined zero value (and therefore do not have
    an "empty" state) can now be nested in fixed-size arrays as long as they are
    nested again, such as in an Option or Vec.

Cleanups

  • Renamed the NewForOverwrite value trait to ForOverwrite.
  • Restructured so that ForOverwrite is now a supertrait of EmptyState, and
    every existing implementation of EmptyState::empty defers to ForOverwrite.

v0.1007.0

01 May 22:03
Compare
Choose a tag to compare
v0.1007.0 Pre-release
Pre-release

v0.1007.0

Breaking changes

  • Tuple typed structs (with anonymous fields accessed like value.0) now start
    their field numbering from zero by default, matching the names of the fields.
  • Renamed the .reader() method on ReverseBuffer to .buf_reader() so it no
    longer conflicts with the bytes::Buf method.

New features

  • Added support for encoding usize and isize pointer-sized integers. They
    will still have different supported maximums on platforms with different sized
    values, but this still has completely reasonable failure modes.
  • Added support for deriving Message for enum types, which is implemented in
    terms of Oneof. The message implementations encode and decode exactly like a
    message which contains only that oneof; see the readme for more details.
  • Changed the Value type in bilrost-types to be a message-via-oneof in this
    way, making it much nicer to use without changing its meaning.
  • Added a .slices() method to ReverseBuffer and ReverseBufferReader which
    iterates its slices, useful for sending to write_vectored.

Fixes

  • Fixed some incorrect tests, including coverage of third-party inline vecs and
    packed/unpacked fixed-size arrays.

Cleanups

  • Cleaned up and re-added fuzzers! Fuzzers are available via both libfuzzer
    and afl; see FUZZING.md for usage details. These fuzzers
    would have caught the bug fixed in 0.1006.1 :)
  • Deduplicated and somewhat improved codegen for oneofs. All four kinds of oneof
    decoder function are now generated by the same code, which is a huge
    improvement over four independent generators.
  • Added tests for detailed errors attribution of decoding errors to the specific
    field that caused the problem.

v0.1006.0

15 Apr 03:18
Compare
Choose a tag to compare
v0.1006.0 Pre-release
Pre-release

v0.1006.0

Breaking changes

  • The (unstable) internal encoding traits continue to evolve, now varying the
    implementation of TagMeasurer and moving the "allow empty" argument of
    distinguished value decoding into a const generic param.

New features

  • Hash maps and hash sets can now have any kind of hasher, as long as the
    BuildHasher implements Default.
  • Plain tuples can now be encoded as message fields! Tuples encode exactly the
    same as messages with field tags 0 through N-1, but the encoding of each field
    in the tuple can be specified. See the readme for more information.
  • Fixed-size arrays ([T; N]) can now also be encoded as message fields. Arrays
    encode exactly the same as a collection like Vec would, except if each value
    in the array is empty the whole array is considered empty. When decoding an
    array, if a nonzero number of items is present and it is not the same number
    of items as the size of the array, the value and message being decoded are
    considered to be invalid.
  • A couple third-party alternative types for Vec that have bounded size and
    inline-only storage (ArrayVec from the arrayvec and tinyvec crates) have
    been added.
  • Third-party alternative types for Vec now also work with u8 items and the
    plainbytes encoding.

Fixes

  • Added a Self: Default bound to the impl for Message when there are ignored
    fields. This means that it can be possible to have a message type with ignored
    fields and generically typed fields that don't implement Default; rather
    than failing to compile, it will now simply not implement Message.

Cleanups

  • Consolidated (almost) all the standard impls of the EmptyState trait into
    the same module.

v0.1005.1

06 Apr 22:59
Compare
Choose a tag to compare
v0.1005.1 Pre-release
Pre-release

v0.1005.1

This release changes nothing, just fixes the link to the logo in the docs :)

v0.1005.0

06 Apr 22:59
Compare
Choose a tag to compare
v0.1005.0 Pre-release
Pre-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.

v0.1004.0

04 Mar 07:03
Compare
Choose a tag to compare
v0.1004.0 Pre-release
Pre-release

v0.1004.0

Breaking changes

  • The "encoder" attribute for message & oneof fields is now "encoding". This
    reads better and makes more sense, better to do it now.
  • Conversion to & from u32 now uses the Enumeration trait rather than
    Into<u32> and TryFrom<u32>.
  • The "opaque" types, bilrost::encoding::opaque::{OpaqueMessage, OpaqueValue}
    now use Cow under the hood instead of Vec, allowing them to hold borrowed
    data rather than only owned.

New features

  • There is now an Enumeration trait for converting to & from u32 from
    derived enumerations.

Fixes

  • Fixed some incorrect documentation.

Cleanups

  • Large refactor that changes the underlying Encoder traits from
    impl Encoder<Value> for Encoding to impl Encoder<Encoding> for Value. This
    avoids issues with a new "non_local_definitions" lint which fires when trait
    implementations are derived for a function-local type.

v0.1003.1

25 Feb 08:41
Compare
Choose a tag to compare
v0.1003.1 Pre-release
Pre-release

v0.1003.1

Fixes

  • Fixed some incorrect documentation.