Comments (2)
This might be a convenient way for us to expose .NET intrinsic types for simple scalar fields.
We're architecturally bound to fbs schema files to generate the models.
from flatsharp.
flatc
, the official compiler has a newer feature to dump the contents of the FBS file into a structured FlatBuffer schema. So, instead of telling it to generate C#, you tell it to build the schema, and it generates a FlatBuffer file representing the schema that it just parsed.
Parsing an IDL file like FBS is nontrivial today, and there are always lots of "gotchas". FlatSharp's current implementation generally maps well to the flatc
implementation, but it's starting to reach its limits, and a rewrite is needed.
To take advantage of flatc
, FlatSharp 6.0.0 will begin using the output of flatc
's IDL parse to generate C#. The rest will remain the same. FlatSharp will continue to support all the things it did in 5.7.1. There will just be a different parser in front of it.
This has lots of advantages:
- No more cases where FlatSharp would compile something but
flatc
wouldn't. - No more cases where FlatSharp interprets the IDL differently (there was a bug at one point around enums starting at 0 or 1)
- Less to maintain in FlatSharp. No more grammar, validation, etc.
But also a few drawbacks:
- Extensibility items like this will be less harder.
- FlatSharp is less able to support schema extensions.
from flatsharp.
Related Issues (20)
- Closer integration with Unity Native Collections types HOT 10
- Mapping flatbuffer value type structs to existing C# types HOT 18
- Add fs_preserveCase attribute for members, to allow preserving identical case as in fbs HOT 2
- Unions of 41 types cause a compilation error HOT 6
- Comments Requested: Reducing FlatSharp Allocations HOT 14
- Unity Support HOT 14
- Compile fails to add 'required' to net7.0 generated code HOT 5
- Duplicate Clone Functions v 7.0.2 HOT 4
- Serializer.Parse stream API? HOT 4
- Some questions HOT 2
- Generated code uses nullable annotations HOT 2
- Arithmetic operation resulted in an overflow HOT 2
- Pipeline-Build-Error at executing the flatsharp compiler HOT 3
- Generated defaults fail to handle enums with negative int & large ulong HOT 2
- FlatSharp Support for 64 Bit FlatBuffers
- Codestripping with IL2CPP HOT 7
- Compilation target fails when executable path (i.e. nuget cache path) contains spaces
- Namespace not found HOT 1
- Implementation of IInputBuffer for ReadOnlySequence<byte> HOT 6
- Share table HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flatsharp.