Comments (2)
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.
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)
- Share table HOT 2
- [Bug] Using the latest "Standalone" `FlatSharp` nuget in a .net6 project; generates a file that requires `IPoolableObject` HOT 2
- Reducing compiler generated file HOT 15
- Duplicate fbs filenames in different folders break compilation HOT 2
- Getting TypeLoadException when trying to access FlatSharp types HOT 9
- Shared fbs between multiple projects HOT 11
- [Bug] Flatsharp can't compile schemas on seperate drives HOT 7
- Warnings with new shared project feature HOT 3
- AOT exception when running a game built with Unity 2021.3 IL2CPP HOT 6
- Don't use Nullable properties for GreedyMutable only serializers HOT 4
- Allow fbs fs_serializer attribute to override global code gen settings HOT 2
- Serialization in V7 HOT 1
- Error generating model code when using namespace ending with FlatBuffer in .fbs file HOT 2
- flatsharp.compiler 7.x requires net6.0 SDK HOT 5
- Version conflict detected for Microsoft.CodeAnalysis.Common HOT 2
- Union does not support using the same type HOT 2
- Issue with init-only property when generating FlatSharp schema in .NET 6 HOT 2
- Clean up Exceptions Thrown in Generated Code
- NativeArray<T>' exists in both UnityEngine.CoreModule
- Upgrade System.Runtime.CompilerServices.Unsafe from version 4.x.x to 6.x.x
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.