Skip to content

Releases: betwixt-labs/bebop

Bebop v2.2.1

26 Mar 00:18
af1b3bf
Compare
Choose a tag to compare

bebopc

  • Definitions are now properly sorted during C++ code generation. This means definitions can be defined in any order, and the compiler will sort them for you.

C++ Runtime

  • decodeInto now return the number of bytes read.
  • Guid::toString is now a const function.

Tools

  • There is now a CMake target #110

Bebop v2.2.0

13 Mar 08:36
e36b5b6
Compare
Choose a tag to compare

bebopc

  • All generated code now has proper union length calculation in accordance with the Bebop wire format. This is a breaking change across languages.
  • pragma once is now present in generated C++ code.
  • Generated C++ code now handles nested records properly.
  • Generated C# classes now extend the same abstract base class, BaseBebopRecord
  • Base classes are no longer generated when generating C# code. Instead classes are now unsealed and partial concrete types.
  • Generated C# code no longer uses the record type for a struct using the readonly modifier due to an incompatibility with changes to generated C# types.
  • Empty unions have been made illegal and will raise an exception during compilation.
  • The Value property present on generated C# union containers has been changed from object to BaseBebopRecord.
  • The generic constraints on generated C# union container branches is now the concrete type for each branch.
  • Generated C# code now has various region sections included to help with manual inspection.
  • The amount of generated C# code has been reduced.
  • Generated C++ code now includes a byteCount() member function for each TopLevelDefinition. This function computes the size in bytes the value would have if it were encoded in the Bebop wire format.
  • Generated C# code now includes two new properties, ByteCount and MaxByteCount. These properties can be used to determine either the exact bytes that will be produced when encoding a record in the Bebop wire format, or the upper-bound of bytes that will be produced respectively. (Inspect the inline documentation for more information.)
  • Generated C++ code now has a new member, const size_t minimalEncodedSize , which is a lower bound for the wire-format size of a TopLevelDefinition. For example, minimalEncodedSize for struct Musician { string name; Instrument plays; } is 8: an empty string is 4 bytes on the wire, and an enum is 4 bytes
  • A notice is now appended to the front of all generated source code indicating the file was created by bebopc and should not be modified.

C# Runtime

  • BebopMirror now supports unions.
  • A bug has been fixed in BebopWriter that would incorrectly set the length based on the size of the buffer during initialization. This has caused no issues up to this point as the runtime always create an empty buffer, but another change is planned for the next release to improve memory allocation.
  • BebopMirror performance was improved by 4% by using a concrete type for the type cache rather than an interface.
  • The DefinedTypes property on the BebopMirror class is now backed by a HashSet.
  • The new BaseBebopRecord abstract class was added to the runtime. This is not the same as the BebopRecord class used to facilitate usage of BebopMirror, of which neither should be implemented manually.
  • Various generic constraints have been changed from where T : class, new() to where T : BaseBebopRecord

C++ Runtime

  • The runtime now throws a bebop::MalformedPacketException when it reaches the end of the buffer prematurely, or when it reads a length prefix larger than the amount of bytes left in the buffer.
  • A new ByteCounter class has been introduced in the runtime and a very tiny bit of template magic to support the new byteCount() member function.
  • Many places that previously accepted a const uint8_t* sourceBuffer now need an additional size_t sourceBufferSize, so this release breaks those APIs.
  • Improvements have been made to the way memory.
  • BEBOPC_VER_MAJOR, BEBOPC_VER_MINOR, BEBOPC_VER_PATCH, BEBOPC_VER, and BEBOPC_VER_INFO have been introduced to C++ runtime. The values of the defines are set before bebop.hpp is written to disk and indicate the exact version of bebopc that produced it.

TypeScript Runtime

  • A minor improvement has been made so that the lookup table for converting bytes to hex is now a constant variable, rather than being repopulated with the creation of each BebopView.

Bebop v2.1.4

02 Mar 14:22
934b823
Compare
Choose a tag to compare

bebopc

  • bebop.hpp is written to disk when generating C++ code.
  • Unrecognized command-line flags are now reported.
  • The compiler now has better validation for Unions such as checking for duplicate discriminators or bad tags.
  • The compiler will now throw an error when an Enum has members with duplicate names.
  • Documentation from union branches is now moved to the inner definitions.
  • Generated C# code now contains constructors. (#77)
  • Generated C# code will leverage the record type for structs with the readonly modifier.
  • Generated C# code now uses the global prefix for type resolution to fix ambiguous reference issues.
  • Generated C# concrete types now have the partial modifier
  • snake_casing is now properly converted to PascalCase where relevant.
  • Fixes an issue where new line characters in documentation would break the codegen for C#.
  • Fixes an issue where various places in generated C# code didn't have the namespace prefixed.
  • Fixes an issue in the C# codegen where duplicate constructors were generated if a type had no members .
  • The C# codegen now converts Enum definition names and members to PascalCase.
  • The C# codegen now properly prefixes the namespace on Enums.
  • Two-character acronyms are now preserved during PascalCase conversion.

C++ Runtime

  • Fixes a bug when writing 64-bit floats.
  • Various style improvements to bebop.hpp

Bebop v2.1.3

02 Mar 12:52
df72bff
Compare
Choose a tag to compare

bebopc

  • bebop.hpp is written to disk when generating C++ code.
  • Unrecognized command-line flags are now reported.
  • The compiler now has better validation for Unions such as checking for duplicate discriminators or bad tags.
  • The compiler will now throw an error when an Enum has members with duplicate names.
  • Documentation from union branches is now moved to the inner definitions.
  • Generated C# code now contains constructors. (#77)
  • Generated C# code will leverage the record type for structs with the readonly modifier.
  • Generated C# code now uses the global prefix for type resolution to fix ambiguous reference issues.
  • Generated C# concrete types now have the partial modifier
  • snake_casing is now properly converted to PascalCase where relevant.
  • Fixes an issue where new line characters in documentation would break the codegen for C#.
  • Fixes an issue where various places in generated C# code didn't have the namespace prefixed.
  • Fixes an issue in the C# codegen where duplicate constructors were generated if a type had no members .
  • The C# codegen now converts Enum definition names and members to PascalCase.
  • The C# codegen now properly prefixes the namespace on Enums.
  • Two-character acronyms are now preserved during PascalCase conversion.

C++ Runtime

  • Fixes a bug when writing 64-bit floats.
  • Various style improvements to bebop.hpp

Bebop v2.1.2

02 Mar 08:57
83becaa
Compare
Choose a tag to compare

bebopc

  • bebop.hpp is written to disk when generating C++ code.
  • Unrecognized command-line flags are now reported.
  • The compiler now has better validation for Unions such as checking for duplicate discriminators or bad tags.
  • The compiler will now throw an error when an Enum has members with duplicate names.
  • Documentation from union branches is now moved to the inner definitions.
  • Generated C# code now contains constructors. (#77)
  • Generated C# code will leverage the record type for structs with the readonly modifier.
  • Generated C# code now uses the global prefix for type resolution to fix ambiguous reference issues.
  • Generated C# concrete types now have the partial modifier
  • snake_casing is now properly converted to PascalCase where relevant.

C++ Runtime

  • Fixes a bug when writing 64-bit floats.
  • Various style improvements to bebop.hpp

Bebop v2.1.1

22 Feb 11:50
aa4ec61
Compare
Choose a tag to compare

C++ Runtime

  • Fixes memory alignment issues #91

Tools

  • Fixes the .targets file for the nuget package #93

Bebop v2.1.0

09 Feb 21:43
bcfd57c
Compare
Choose a tag to compare

bebopc

  • Added support for C++ codegen (#86)
  • Added support for Discriminated Unions (#87, #65, #75)
  • Misc bug fixes

.NET Runtime

  • The BebopRecord attribute now defines more information about a generated type.
  • Support for the new autogenerated union types was added.
  • It is now possible to find a BebopRecord using the built-in Type object without generics (BebopMirror.FindRecordFromType(object.GetType()))
  • OpCode variables have the proper unsigned value.

TypeScript Runtime

  • Various performance optimizations

C++ Runtime

  • A new C++ runtime was created.

Tools

  • The "C#" tool is now a cross-platform nuget package for any project using MSBuild and a language can be defined as a property.

Notes

Discriminated Unions are only supported in C#, TypeScript, and C++. Code generation will not occur for Dart at this time.

For more documentation on unions view the updated wiki.

Bebop v2.0.6

26 Jan 05:20
e9fac51
Compare
Choose a tag to compare

Bebop v2.0.5

12 Jan 00:40
fe19f90
Compare
Choose a tag to compare

bebopc

  • Fixes a crash due to invalid uint32 parsing in schemas

Bebop v2.0.4

07 Jan 18:48
2dde015
Compare
Choose a tag to compare

.NET Runtime

  • Empty strings no longer cause encoding to fail.
  • Empty strings no longer cause decoding to fail.

TypeScript Runtime

  • Empty strings no longer cause unnecessary allocations during encoding.

Dart Runtime

  • Empty strings are properly represented at encode time.
  • Optimizations made to the UTF8 encoder / decoding.

These runtime changes are backwards compatible bug fixes.