v0.1011.0
Pre-release
Pre-release
mumbleskates
released this
03 Jan 08:16
·
237 commits
to bilrost
since this release
v0.1011.0
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
andstd::time::SystemTime
. - Added 3rd party type support for the
bstr
crate and itsBString
type,
which is a wrapper aroundVec<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
andtime
crates and most of
their important types, available through new crate features. Oneof
types can now be wrapped inBox
(multiple times even, and either
side ofOption
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 needlesslet 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
andclippy
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 thevalue_traits
module now contains only traits and
macros and all conditionally-enabled code has been moved intotype_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.