Skip to content

v0.1001.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@mumbleskates mumbleskates released this 23 Feb 20:37
· 525 commits to bilrost since this release

v0.1001.0

Breaking changes

  • Changed the name of the detailed-errors feature to have a hyphen instead of
    an underscore, consistent with the other feature names.
  • Renamed the vecblob encoder to plainbytes.
  • Encoded bilrost values and semantics no longer rely on the Default
    implementation for their empty values.
    • Message no longer requires, nor does its derive macro provide, an
      implementation of Default.
    • Enumeration no longer cares whether the type has a Default
      implementation, only whether there is a variant whose Bilrost value is
      exactly 0.
    • All of the above duties are taken on by the HasEmptyState trait, as does
      the base implementation for NewForOverwrite.
  • Following on that, renamed the HasEmptyState trait to EmptyState.
  • Usability fixes for Blob: new(..) has been changed to create an empty
    Blob with no arguments, and the functionality for wrapping a vec has been
    renamed to from_vec(..).
  • Added APIs for replace_from(..) etc. to the regular non-dyn Message
    traits, which is useful for messages with ignored fields but requires those
    same APIs in the MessageDyn and DistinguishedMessageDyn traits to be
    renamed to replace_from_dyn(..) etc.

New features

  • Added features that enable support of smallvec, thin-vec, and tinyvec.
  • Added support for u16 and i16 with the general encoder, and added a
    new varint encoder that supports all the varint types in addition to u8
    and i8. general will not support one-byte integers, because this makes it
    too easy to accidentally spell a completely unintended encoding of Vec<u8>;
    encodings for collections of bytes like this will remain explicit.
  • Added support for [u8; N] with the plainbytes encoder, which only accepts
    values of the correct length.
  • Added support for [u8; 4] and [u8; 8] with the fixed encoder.
  • Added support for marking message fields with #[bilrost(ignore)], which
    causes the field to be excluded from encoding and decoding but precludes
    distinguished decoding.
  • Added replace_from_slice(&[u8])
    and replace_distinguished_from_slice(&[u8]) to the MessageDyn
    and DistinguishedMessageDyn traits.
  • Changed value-decoding to pass down whether or not an empty value is allowed,
    allowing implementations to err sooner and cheaper by detecting that the
    encoded data is that which represents the empty value, rather than always
    checking the value for emptiness after the fact.

Fixes

  • Require the serde_json/float_roundtrip feature for
    the bilrost-types/serde_json compatibility. If that feature is desired to be
    disabled, the serde_json feature in bilrost-types currently only provides
    from/into anyway and those can be written elsewhere.

Cleanups

  • Deduplicated implementations of Encoder and DistinguishedEncoder that
    blanket all implementations for which those encoders support value-encoding.
  • Great strides in expanding and cleaning up the documentation.