Zero C#
C# with no runtime and no garbage collector — tiny native programs that run anywhere, from Linux to a bare PC.
Project intro
Zero C# compiles C# straight to small native programs — no .NET runtime, no garbage collector, nothing to install where it runs. A hello world is 16 to 39 KB on Linux. It has 65 stars and 2 forks on GitHub.
You keep the C# you know — syntax, generics, spans, interfaces, lambdas — and give up the parts that need a runtime: the garbage collector, catchable exceptions, reflection, and most of the base class library. Memory you want back goes in an arena and is freed all at once.
The same code runs on Linux, macOS, and Windows, on WebAssembly, on DOS on a 386, and on a bare PC with no operating system at all, started by its UEFI firmware. The samples include a language model that tells the same story on every target, and a small 320x200 game for DOS and UEFI.
It builds on bflat's zero mode, with a small MIT-licensed core library replacing bflat's own library so no AGPL code ends up in your program. Install it with the .NET 10 SDK — one template command — and the latest push landed on 22 November 2026.
Actions
Tech stack
Project info
- Project category
- Developer Tools
- Project status
- Online
- Collaboration intent
- None