bflattened / bflat

C# as you know it but with Go-inspired tooling (small, selfcontained, and native executables)
GNU Affero General Public License v3.0
3.63k stars 104 forks source link

Does bflat support source generator? #91

Open xiaoyuvax opened 1 year ago

xiaoyuvax commented 1 year ago

such as Utf8Json, which is recommneded for application compiled by dotnet nativeAOT to serilize/de json without reflection. as mentioned in: https://github.com/dotnet/runtimelab/issues/635

i don't know if bflat also has that json problem and i also wonder about the source generator.

MichalStrehovsky commented 1 year ago

The source generator for Json is not included and there's no way to enable it right now. Yeah, it should be fixed.

xiaoyuvax commented 1 year ago

I prefer a solution for bflat to work with Json.NET, since most of my projects use it. seems the Root descriptor the last hope?

CypherPotato commented 10 months ago

+1. This is an needed feature which some of my projects indeed uses JSON. I don't know any other json libs that runs on native aot...

M0n7y5 commented 7 months ago

+1 too. Its not just json. Source Generators can help avoid memory allocations in the first place and hide some weird quirks while working with memory management using zerolib.