GithubHelp home page GithubHelp logo

Some questions about flatsharp HOT 2 CLOSED

ZensYue avatar ZensYue commented on September 26, 2024
Some questions

from flatsharp.

Comments (2)

jamescourtney avatar jamescourtney commented on September 26, 2024

Hello -- thanks for your comment. I have a few questions for you:

The generated code is too long

I understand that FlatSharp v7 is more aggressive about generating code. This was an intentional choice and I know the code can be longer. However, it is my understanding that...

  • If using .NET, the JIT will only compile what you actually use.
  • If using Unity/AOT, unused portions of the code will be trimmed by the linker.

If you could explain your scenario and why this is a problem that would be very helpful. Your suggestion of adding a compiler switch to export deserialization modes is interesting and is something I can consider once I understand your scenarios more thoroughly.

I haven't seen the code specification document.

Can you elaborate on what you are looking for here? All of the available docs for FlatSharp are in the wiki.

The FlatSharp.generated.cs file already exists, and the code will not be regenerated.

In the header of the generated file is a SHA256 hash of the input FBS files and FlatSharp compiler version. If the FBS files have not changed, then the code won't regenerate. This is because the FlatSharp compiler can be slow for a full invocation.

Customizing the name of the​ FlatSharp.generated.cs file is not supported now. Is there a plan to support it?

There's no reason in principle this couldn't be supported. However, FlatSharp expects you to pass in all your .FBS files in one invocation: dotnet FlatSharp.Compiler.dll -i "file1.fbs;file2.fbs;file3.fbs", so my expectation was that there wasn't a need for more granular names.

from flatsharp.

ZensYue avatar ZensYue commented on September 26, 2024

Thank You~ I'm a Unity developer.

The generated code is too long

The files generated by unity through Il2cpp will be longer.

I haven't seen the code specification document.

I hope to submit a pull request according to the code specification to share a share of strength with the flatsharp community.

In the header of the generated file is a SHA256 hash of the input FBS files and FlatSharp compiler version. If the FBS files have not changed, then the code won't regenerate. This is because the FlatSharp compiler can be slow for a full invocation.

I got it.

Customizing the name of the​ FlatSharp.generated.cs file is not supported now. Is there a plan to support it?

The places where flatsharp is used are game configuration and network protocol. These two modules will be maintained and modified by two groups of people.

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.