~tdeo/serde_bare

Link to ticket tracker in README
Update documentation
7538e31a — Enrico Lumetti a month ago
Do not accept sequences with no length information
Release 0.3.0
Exclude reference benchmarks from published crate
Makefile: add bench-all to .PHONY
go-reference: Run goimports
Add Criterion benchmarks

Introduces a (hopefully) representative set of benchmarks for an
imaginary 'User session token', with a variable size depending on which
fields are populated. Does not yet cover floating point or union types.

Also included is a go-bare implementation of an identical benchmark, so
that we can compare our implementation again the 'reference' code.
Remove Error::IdentifierUnsupported

This is a breaking change.
Deserialize Enum discriminant as Uint

The serializer encodes the variant of an enum as a BARE Uint, so the
deserializer should do the inverse when trying to deserialize a message.

Serde's serialize interface only receives variant indexes as u32,
despite the compiler allowing a cast to virtually any primitive integer
type.
Improve variable-length integer robustness

Move the maximum length check above the left shift, so we don't try and
shift more than 64 bits into the accumulator.

Return serde::de::Errors from the invalid branches of the Uint
deserialization implementation rather than panicking on bogus or
truncated input.

Also clean up a Clippy lint in the Uint serialize implementation, using
the .take(i) iterator adapter rather than a ranged for-loop.
Release 0.2.0
only test u128 when serde's 128-bit integers are enabled
minor whitespace changes
clean up read_bytes
Stop blindly allocating fields based on length

If we allocate and zero the memory for a length-prefixed field up front,
it makes it trivial to DOS the deserializer by sending an enormous
length prefix.

Instead allocate at most one page of memory, growing the Vec as required
to accomodate the data actually available in the incoming buffer.
remove "incomplete" from Cargo description
Update documentation
Miscellaneous updates
Switch from u32 to uint for lengths
Next