All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- The TypeScript deserialization functions now have a more permissive type signature.
- Typical no longer requires specifying
$field
when serializing choices.
- Typical now requires optional struct fields to be explicitly set to
undefined
in TypeScript to avoid setting them. Previously, such fields could be omitted entirely, but that meant typos in optional field names could go unnoticed.
- Typical now requires field index gaps to be marked as deleted.
- Some redundant conversions are no longer emitted by the Rust code generator.
- Typical supports a new platform: Windows on AArch64.
- Typical supports a new platform: musl Linux on AArch64.
- Typical supports a new platform: GNU Linux on AArch64.
- Typical supports a new platform: macOS on Apple silicon.
- The deserialization code generated for Rust is now significantly faster for certain types of messages.
- The serialization and deserialization functions generated for Rust now have more general type signatures.
- The generated Rust code is now slightly more DRY.
- The generated Rust code now uses an asymptotically more efficient serialization algorithm. The binary encoding is unchanged.
- The generated TypeScript code now exports a
size
function for computing the expected size of a message on the wire. - Identifiers are no longer allowed to begin with underscores to allow code generators to use underscore-prefixed names without worrying about colliding with user-defined fields.
- Fixed a bug in the TypeScript code generator that allowed for a name collision with user-defined fields named
size
.
- The generated TypeScript code now exports a safer API for deserialization.
- The performance of string serialization for TypeScript has been significantly optimized.
- The generated TypeScript code now exports a simpler API for serialization for convenience.
- The generated TypeScript code now uses an asymptotically more efficient serialization algorithm. The binary encoding is unchanged.
- The generated Rust and TypeScript code now features exported utility functions near the beginning of the file for better visibility.
- Both code generators now produce slightly more efficient code.
- The signature of the TypeScript deserialization functions has been simplified.
- The TypeScript code generator now produces more efficient code.
- The TypeScript code generator now produces code that makes ESLint happier.
- Choices now have a different representation in TypeScript and JavaScript. The payload is now a property named after the appropriate field, rather than the
value
property. To avoid collisions with user-defined fields, thefield
andfallback
fields have been renamed to$field
and$fallback
, respectively. For example,{ type: 'foo', value: 0 }
is now{ $type: 'foo', foo: 0 }
.
- Fixed several bugs in the TypeScript code generator. A comprehensive integration test suite has been added which features the same tests as the Rust suite. The binary data produced by both suites are validated to be bit-for-bit identical.
- The encoding has changed. In particular, two of the size modes have swapped meaning.
- Generated Rust deserialization code is now guaranteed to consume the entire buffer.
- Generated Rust code is now slightly more compact.
- The help entries now use a consistent verb tense.
- Added support for TypeScript code generation.
- Fixed a bug in the Rust code generator that would cause invalid code to be generated if the schema refers to (possibly nested) arrays of user-defined types.
- Changed the way
S64
is encoded to enable more straightforward code generation. This change only affects values greater than or equal to567,382,630,219,904
.
- Fixed a typo in a log message.
- Slightly improved the
format
subcommand behavior such that it is now always possible to have a top-level comment. Previously, in some situations, a comment intended to be a top-level comment would be interpreted as a comment on the first declaration.
- Added the
format
subcommand.
- Added the
list-schemas
flag to thegenerate
subcommand.
- Fixed a bug that would prevent the generated Rust code from compiling for schemas that contain anything of type
[U64]
. The bug was discovered by a newly expanded integration test suite.
- Renamed
--rust-out
to--rust
and--typescript-out
to--typescript
.
- Fixed a bug in the variable-width integer serialization logic for Rust which affected numbers in the range [
567,382,630,219,904
,72,624,976,668,147,840
).
- Messages now use a more compact binary encoding which guarantees that "zero-like" values (numerical
0
, Booleanfalse
, empty arrays, etc.) consume zero bytes as fields. - The encoding and decoding logic for variable-length integers has been optimized.
- Introduced the
deleted
fields feature.
- Fixed a bug that prevented Typical from working on Windows.
- The Rust code generator is now designed to be invoked by a Cargo build script.
- Renamed
--rust-out-file
to--rust-out
.
- Initial release.