Giter Club home page Giter Club logo

Comments (2)

TYoungSL avatar TYoungSL commented on September 8, 2024

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.

jamescourtney avatar jamescourtney commented on September 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.