Skip to content- Sources: primary, discussion
- Summary: Zero C#, a fork of the bflat compiler, builds C# into native programs without the .NET runtime or a garbage collector, freeing memory through arenas and ending the program on throw. Hello world is 11 KB on Windows and 40 KB on Linux, and the same source targets Linux, macOS, Windows, WASI and DOS on a 386. The Show HN post drew 163 points and 113 comments.
- Why it matters: It shows how far C# 15 features such as unions and per-type generics can go without a runtime, though it gives up exceptions, reflection, async and the standard library.
- Comments: Commenters asked what it adds over NativeAOT plus Span and unsafe code, noting NativeAOT removes the JIT but not the GC. Others pointed out that existing C# libraries will not work under arena memory management, and one warned that maintaining a fork of the .NET toolchain is labor intensive. The longest subthread debated whether generational moving GCs already behave like arenas.