by andai · 3y ago · 0 comments
I wonder if this could be used to make C# webassembly more viable. If I remember, a significant part of the download size is the .NET libraries (themselves written in C#?)
On that note, is there any 2D game framework/engine that targets the browser that uses C# and produces small binaries?
You might enjoy reading this GitHub thread [0] where the community contributed a WASM library wrapping the C# regex code so that regex101.com could have a "C# mode". Lots of nerd sniping about reducing the payload size.
(There's also another thread [1] discussing the minification of a rust version of that same regex101 wasm library to provide a "rust mode" using @burntsushi's regex crate.)
Until WASM ships GC, you're stuck with having to download an entire runtime regardless.
>On that note, is there any 2D game framework/engine that targets the browser that uses C# and produces small binaries?
Godot supports C# scripting and WASM compilation, probably your best bet.
Thanks for the Godot tip. I haven't checked it out in a while. I found it very counterintuitive (and a 3D engine is definitely overkill for small 2D games... I basically just want Flash... I guess Phaser or Haxe are my best bets).