jamescourtney / FlatSharp

Fast, idiomatic C# implementation of Flatbuffers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Meta] List of Changes in FlatSharp 6

jamescourtney opened this issue · comments

This is a tracking item to list the changes in Flatsharp 6.0.0.

Breaking changes:

  • ISharedStringReader has been removed.
  • FlatBufferItem.CustomGetter has been removed.
  • ArrayInputBuffer is now a struct
  • MemoryInputBuffer is now a struct
  • ReadOnlyMemoryInputBuffer is now a struct
  • SharedStringReaderFactory has been removed from IInputBuffer.
  • ArrayInputBuffer.Wrapper has been removed
  • MemoryInputBuffer.Wrapper has been removed
  • ReadOnlyMemoryInputBuffer.Wrapper has been removed.
  • IFlatBufferAddressableStruct has been removed.
  • SpanWriter.Instance has been removed. Use default(SpanWriter) instead.
  • ArrayInputBuffer has been split into ArrayInputBuffer and ArraySegmentInputBuffer
  • The fs_fileId attribute has been dropped.
  • Unquoted metadata no longer supported. Compiler now runs through flatc, so attribute declarations are now necessary.
  • The FlatSharp.Compiler Package no longer targets .NET Framework or .NET Core 2.1 (You can still use it to build code that will run in these frameworks, though!)
  • ISharedStringWriter has been changed. The PrepareWrite method has been renamed Reset, and there is a new flag called IsDirty that is expected to be true if the shared string writer has any pending strings.

Other changes

  • FlatBufferSerializer exposes some additional methods that allow avoiding boxing of IInputBuffer instances.
  • ArrayInputBuffer now ~10% faster as a result of the split above.
  • WriteThrough now supported for value structs
  • Serializers now have a default instance of SharedStringWriter with a hash table capacity of about 1K items.

Major changes

  • Compiler is being completely rewritten to be based on bfbs output from flatc.
  • PropertyCache, VectorCache, and VectorCacheMutable are being collapsed into Progressive deserialization mode.
  • The SharedString type has been removed and replaced with an annotation. No more SharedString type muddling things!
  • Unions are now value types
  • The Flatsharp.Unsafe package has been removed.