Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>Can C# apps hit the sizes where users would consider the download times instant? Would it enable C# to be used in places where it isn’t used right now?

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?



> I wonder if this could be used to make C# webassembly more viable.

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.)

[0]: https://github.com/firasdib/Regex101/issues/156

[1]: https://github.com/firasdib/Regex101/issues/1208


>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#?)

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.


Yeah, I was wondering if the techniques described in these articles could reduce the size of the .NET libs in the wasm bundle. (I'm not sure what language the runtime itself is implemented in, I think also mostly C# for (formerly known as) .NET Core?)

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).


Godot was originally 2d (only?). At any rate the 2d portion is much more mature than the 3d.


Unity can hit below 3MB[0]. Afaik Godot builds are a bit larger due to limited code stripping and builds not being compressed out of the box.

[0] https://github.com/JohannesDeml/UnityWebGL-LoadingTest


I think godot exports to web, but I’m not sure if you’d consider it small binaries.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: