Releases: mumbleskates/bilrost
Releases · mumbleskates/bilrost
v0.1010.1
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
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 inbilrost_types::Timestamp
's conversion from strings.
v0.1009.0
v0.1009.0
New features
- Added
encode_contiguous
andencode_length_delimited_contiguous
APIs to the
Message
trait which use theencode_fast
prepend-encoding code path but
measure the size first to always produce a contiguous buffer. - Added
into_vec(self)
toReverseBuffer
complete with a non-copying
optimization when the buffer is full and contiguous, such as when it is
produced byMessage::encode_contiguous
.
v0.1008.0
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 anOption
orVec
.
Cleanups
- Renamed the
NewForOverwrite
value trait toForOverwrite
. - Restructured so that
ForOverwrite
is now a supertrait ofEmptyState
, and
every existing implementation ofEmptyState::empty
defers toForOverwrite
.
v0.1007.0
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 onReverseBuffer
to.buf_reader()
so it no
longer conflicts with thebytes::Buf
method.
New features
- Added support for encoding
usize
andisize
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
forenum
types, which is implemented in
terms ofOneof
. 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 inbilrost-types
to be a message-via-oneof in this
way, making it much nicer to use without changing its meaning. - Added a
.slices()
method toReverseBuffer
andReverseBufferReader
which
iterates its slices, useful for sending towrite_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
andafl
; seeFUZZING.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
v0.1006.0
Breaking changes
- The (unstable) internal encoding traits continue to evolve, now varying the
implementation ofTagMeasurer
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
implementsDefault
. - 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 likeVec
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 thearrayvec
andtinyvec
crates) have
been added. - Third-party alternative types for
Vec
now also work withu8
items and the
plainbytes
encoding.
Fixes
- Added a
Self: Default
bound to the impl forMessage
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 implementDefault
; rather
than failing to compile, it will now simply not implementMessage
.
Cleanups
- Consolidated (almost) all the standard impls of the
EmptyState
trait into
the same module.
v0.1005.1
v0.1005.1
This release changes nothing, just fixes the link to the logo in the docs :)
v0.1005.0
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 oldoneof
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 nowno_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 usingstd
.
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
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 theEnumeration
trait rather than
Into<u32>
andTryFrom<u32>
. - The "opaque" types,
bilrost::encoding::opaque::{OpaqueMessage, OpaqueValue}
now useCow
under the hood instead ofVec
, allowing them to hold borrowed
data rather than only owned.
New features
- There is now an
Enumeration
trait for converting to & fromu32
from
derived enumerations.
Fixes
- Fixed some incorrect documentation.
Cleanups
- Large refactor that changes the underlying
Encoder
traits from
impl Encoder<Value> for Encoding
toimpl 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
v0.1003.1
Fixes
- Fixed some incorrect documentation.