Also, if you compile Ahead Of Time (AOT) you can cut down on the features and get basically as small a subset as you want of the libraries. IMHO C# and dotnet are really starting to become very impressive.
There's also bflat [0]. Not an official Microsoft product, more of a passion project of a specific employee.
"C# as you know it but with Go-inspired tooling that produces small, selfcontained, and native executables out of the box." Really impressive. Self contained and small build system.
AOT requires a lot of fiddling around, and might break the application unexpectedly, with very weird errors. It is mostly targeted to Blazor (WASM) and for serverless functions.
The default runtime and JIT are fine for most use cases.
> AOT requires a lot of fiddling around, and might break the application unexpectedly, with very weird errors.
It hasn't been my experience. Native AOT does come with some limitations [1][2], but nothing awful. Mostly it's that you can't generate code at runtime and you have to tame the code trimmer. Just don't ignore code analysis warnings and you should be good.
> It is mostly targeted to Blazor (WASM) and for serverless functions.
Making your CLIs start fast is also a huge use case.
C# AOT may sometimes require fiddling around, but in my experience a lot less fiddling around than what my alternative used to be, which was to use C++.