One of the best parts of the .NET ecosystem is the excitement around experimentation. Someone is always taking .NET to the next level, trying new things, pushing the envelope. Michal Strehovsky has an interesting experiment on his GitHub called “bflat.” This is not a product, it’s a playground.
I find this characterization funny:
Michal is basically stripping .NET down to the bare minimum and combining the official compiler and and the experimental AOT (Ahead of Time) compiler to make single small EXEs that are totally self-contained. Michal says you can get involved if you like!
Hello World today is about 2 megs. He says it’s because:
So when I ran But when I run bflat.exe build --no-reflection --no-stacktrace-data --no-globalization --no-exception-messages .\hello.cs I end up with a 750kb file! Sure, it’s not C code because it’ll never be C code. You get access to a LOT MORE with C#. This could be a useful system for creating tiny apps in C# for Linux or Windows command line administration. It also showcases how the open pieces of .NET can be plugged together differently to achieve interesting results. I’m sure there’s lot of AOT limitations around Reflection, Attributes, and more, but this is still a very cool experiment, go check it out at https://github.com/MichalStrehovsky/bflat! Sponsor: Pluralsight helps teams build better tech skills through expert-led, hands-on practice and clear development paths. For a limited time, get 50% off your first month and start building stronger skills. © 2021 Scott Hanselman. All rights reserved. C sharp or B flat? Experiments in self-contained native executables in .NET published first on http://7elementswd.tumblr.com/ via Tumblr C sharp or B flat? Experiments in self-contained native executables in .NET
0 Comments
Leave a Reply. |
About UsIf you want to keep up with the latest in web design, you have to be willing to study and learn on an ongoing basis. If you are a web developer or web designer, you’ll find a lot of useful tutorials and code snippets collection here. Furthermore, we also discuss more general topics of web design and how the role of a web designer has evolved over the years.
|