Sign in

Michal Strehovský

@migeel.sk
708 followers 120 following 96 posts

I help building the .NET runtime at Microsoft. My tweets are my own opinions and/or shitposts, not the official party line.

PostsRepliesMedia
Michal Strehovský @migeel.sk · 04/09/2026
The most problematic thing usually solved with reflection is serialization where the string that needs to be adapted is literally downloaded from the internet. But I applaud this because it might be the thing to allow Android apps to be AOT compiled native AOT style
000
Michal Strehovský @migeel.sk · 03/09/2026
(You now have to obfuscate anything you submit to the store and obfuscation breaks reflection randomly.)
110
Michal Strehovský @migeel.sk · 03/09/2026
It's happening! Google is outlawing reflection! android-developers.googleblog.com/2026/08/app-...
android-developers.googleblog.com
Elevating app quality: Reducing memory usage and improving device migration
News and insights on the Android platform, developer tools, and events.
160
Michal Strehovský @migeel.sk · 19/05/2026
I'll be speaking at the .NET Developers meetup in Tokyo on June 9th!
Tokyo .NET Developers Meetup #67 - Native AOT And Runtime Async, RSVP at tokyo-dotnet.com
020
Michal Strehovský @migeel.sk · 06/05/2026
4/N Anyway here it is: github.com/MichalStreho.... I'll probably vibe on it a bit more later. It only has one test running in the CI and it literally is DOOM (ensuring we play the expected demoloop). I hit surprisingly few bugs getting DOOM to run with it (once it got past init, it worked), but YMMV
github.com
GitHub - MichalStrehovsky/chibil: C compiler for .NET
C compiler for .NET. Contribute to MichalStrehovsky/chibil development by creating an account on GitHub.
060
Michal Strehovský @migeel.sk · 06/05/2026
3/N I would probably never actually get to it, but if Anthropic can build an optimizing C compiler from scratch, why wouldn't I be able to make one if I take extra shortcuts (e.g. base it on an existing small C compiler written in C).
110
Michal Strehovský @migeel.sk · 06/05/2026
2/N I've had this in my backlog for _years_. The gist with the COFF object emitter this is using is 5 years old. gist.github.com/MichalStreho...
gist.github.com
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
110
Michal Strehovský @migeel.sk · 06/05/2026
1/N I vibe-coded a C compiler that targets .NET IL. It can build unmodified PureDOOM into a .NET app that runs on both .NET 10 and desktop framework.
1134
Michal Strehovský @migeel.sk · 28/12/2025
Very cool!
000
Reposted by Michal Strehovský
Ahmed Walid @ahmedwalid.bsky.social · 21/12/2025
.NET 11 (NativeAOT) on Windows ARM32!!
0143
Michal Strehovský @migeel.sk · 08/12/2025
Samples all run in the browser with WASM: elix22.github.io/Sokol.NET/
elix22.github.io
Sokol.NET Examples - Interactive WebAssembly Showcase
Try 36 interactive WebAssembly examples showcasing Sokol.NET's cross-platform graphics capabilities. Run directly in your browser!
052
Michal Strehovský @migeel.sk · 08/12/2025
Found Sokol.NET - C# bindings for the Sokol crossplat gfx framework. If you haven't heard about Sokol, it's a C header-only library to build crossplat gfx/audio apps (games). Sokol.NET wraps it for C# (Win/Linux/Mac/Android/iOS/WASM). Tons of samples. Also native AOT: github.com/elix22/Sokol...
github.com
GitHub - elix22/Sokol.NET: Cross-platform graphics framework for C# with .NET NativeAOT | Desktop • Mobile • Web | Direct3D • Metal • OpenGL • WebGL
Cross-platform graphics framework for C# with .NET NativeAOT | Desktop • Mobile • Web | Direct3D • Metal • OpenGL • WebGL - elix22/Sokol.NET
1124
Michal Strehovský @migeel.sk · 03/12/2025
Congratulations!!!
010
Reposted by Michal Strehovský
Damian Edwards @damianedwards.com · 13/11/2025
Nice article on the state of native AOT with the release of .NET 10: code.soundaranbu.com/state-of-nat...
code.soundaranbu.com
State of Native AOT in .NET 10
After 3 years since my previous article on Native AOT, let’s find out how far AOT compilation in .NET has come.
03010
Michal Strehovský @migeel.sk · 07/11/2025
:(. Well at least they added back (an option) to see seconds to the taskbar clock flyout. Maybe proper small icons will come back next.
020
Michal Strehovský @migeel.sk · 07/11/2025
I really hope the Windows UX team will not go this far. Clearly they are mac users so everything is possible
040
Michal Strehovský @migeel.sk · 07/11/2025
Sorry but the off-color corner of the new Word icon looks like a compression artifact when taskbar is set to small (and sorry but small & never combine & show labels is the only correct taskbar configuration on Windows, this is not macOS).
290
Michal Strehovský @migeel.sk · 01/11/2025
How? Typescript to CIL to native? Go for it. You can also just use stock native AOT. The advantage of bflat is really just no friction crosscompilation.
121
Reposted by Michal Strehovský
valentinbreiz.bsky.social @valentinbreiz.bsky.social · 19/10/2025
Cosmos Gen3: The NativeAOT Era and the End of IL2CPU? valentin.bzh/posts/3 #dotnet #osdev #csharp
0104
Michal Strehovský @migeel.sk · 10/07/2025
You'd need to debug the compiler. Either try to find the thing that first triggered it yourself or try reaching out to the email address listed at dotnet.microsoft.com/en-us/platfo.... Make sure you're using the latest version of the .NET Native package.
dotnet.microsoft.com
.NET Native release and support policy | .NET
Learn about .NET Native support and lifecycle policies.
100
Michal Strehovský @migeel.sk · 09/07/2025
I recommend migrating to .NET 9, the UWP support is there now: learn.microsoft.com/en-us/window...
learn.microsoft.com
Learn to create a Hello World UWP app with XAML and .NET 9 - UWP applications
Use XAML with C# to create a simple Hello, world app that targets the Universal Windows Platform (UWP) and .NET 9 on Windows.
100
Michal Strehovský @migeel.sk · 09/07/2025
Usually this is some NuGet that targets NetStandard2.0 (so it can be consumed from .NET Native) but uses a very recent language version (NetStandard 2.0 only officially supports up to C# 7.4; things can be hacked to allow higher version but it's unsupported). E.g. github.com/StackExchang...
github.com
UWP Native compiler error · Issue #2212 · StackExchange/StackExchange.Redis
I have a UWP project When I want build this solution in Release Configuration I got a below error 1>C:\Users\ssoroosh\.nuget\packages\microsoft.net.native.compiler\2.2.12-rel-31116-00\tools\Microso...
200
Michal Strehovský @migeel.sk · 19/06/2025
I'm glad you like them! I don't post on medium anymore so the latest things are at migeel.sk
000
Michal Strehovský @migeel.sk · 06/06/2025
I miss the early days of .NET
030
Michal Strehovský @migeel.sk · 29/05/2025
Ah, rookie mistake, this is how you get a very cursed notepad.exe: bsky.app/profile/mige...
010
Michal Strehovský @migeel.sk · 29/05/2025
If you don't want to retrain muscle memory and don't care for the new notepad: bsky.app/profile/mige...
010
Reposted by Michal Strehovský
Washi @washi-dev.bsky.social · 18/04/2025
After #flareon11 challenge 7, I got inspired to build tooling for #dotnet Native AOT reverse engineering. As such, I built a #Ghidra Analyzer that can automatically recover most .NET types, methods and frozen objects (e.g., strings). 👉https://blog.washi.dev/posts/recovering-nativeaot-metadata/
0143
Reposted by Michal Strehovský
Jb Evain @jb.evain.net · 20/03/2025
A small template to write self-contained Win32 services in C# with NativeAOT: gist.github.com/jbevain/b295...
gist.github.com
Service.cs
GitHub Gist: instantly share code, notes, and snippets.
1185
Michal Strehovský @migeel.sk · 06/03/2025
Ak bude mať Rusko spoločnú hranicu s Moldavskom tak tie mapy dlho aktuálne nebudú.
000
Michal Strehovský @migeel.sk · 04/03/2025
The default value for this property in the SDK is just wrong.
020
Reposted by Michal Strehovský
Kevin Gosse @kevingosse.net · 11/02/2025
I've published the third part of my series of articles about writing a .NET garbage collector in C#. In this one, we add a helper method to inspect the objects in memory, learning about thread modes and the DAC. minidump.net/writing-a-ne... #dotnet
minidump.net
Writing a .NET Garbage Collector in C#  -  Part 3
Using NativeAOT to write a .NET GC in C#. The third part adds some tooling to inspect the objects stored on the heap.
0164
Michal Strehovský @migeel.sk · 29/01/2025
Looking forward to read more about your GC adventures!
110
Michal Strehovský @migeel.sk · 29/01/2025
10/ Then add a MyGC_ prefix to all your UnmanagedCallersOnly methods and they should get exported without the prefix.
100
Michal Strehovský @migeel.sk · 29/01/2025
9/ You can write an MSBuild task that takes $(ExportsFile), reads all lines in it, and Regex.Replace(line, @"MyGC_(\w+)", "$1=MyGC_$1") and write back to $(ExportsFile). Have the MSBuild target run BeforeTargets=LinkNative.
100
Michal Strehovský @migeel.sk · 29/01/2025
8/ We want this instead: EXPORTS GC_Initialize=MyGC_GC_Initialize
100
Michal Strehovský @migeel.sk · 29/01/2025
7/ By default the DEF file that native AOT compiler creates for UnmanagedCallersOnly("MyGC_GC_Initialize") looks like this: EXPORTS MyGC_GC_Initialize
100
Michal Strehovský @migeel.sk · 29/01/2025
6/ That's possible solution one. Possible solution two involves munging the .def file that native AOT compiler creates so that we can use "If the name that you export differs from the name in the DLL, specify the export's name" from the EXPORTS docs.
100
Michal Strehovský @migeel.sk · 29/01/2025
5/ Like this: EXPORTS GC_Initialize=MyNativeAotDll.MyGC_Initialize Put this in a shim.def file and run link.exe like this: `link /dll /def:shim.def /out:shim.dll /noentry`. This produces a DLL with GC_Initialize export that is forwarded to MyGC_Initialize in MyNativeAotDll.
100
Michal Strehovský @migeel.sk · 29/01/2025
4/ It's possible to build forwarder DLLs that simply forward to a symbol in a different DLL without writing a single line of code.
100
Michal Strehovský @migeel.sk · 29/01/2025
3/ The interesting part of the doc: "If the name that you export is from some other module, specify the export's name in the DLL".
100
Michal Strehovský @migeel.sk · 29/01/2025
2/ The DEF file has an EXPORTS section that describes what the DLL exports. The Native AOT compiler makes one when building a DLL. The full docs for the EXPORTS section are here: learn.microsoft.com/en-us/cpp/bu...
learn.microsoft.com
EXPORTS
Learn more about: EXPORTS
100
Michal Strehovský @migeel.sk · 29/01/2025
1/ Oh, this has actually two more solutions. To control what gets exported from DLLs on Windows, one needs to pass a DEF file to link.exe.
100
Reposted by Michal Strehovský
Kevin Gosse @kevingosse.net · 28/01/2025
After writing a profiler in C#, I've now published the first of a series of articles about how use C# to... write a .NET Garbage Collector. #dotnet minidump.net/2025-28-01-w...
minidump.net
Writing a .NET Garbage Collector in C#  -  Part 1
First part of a series of articles about writing a .NET Garbage Collector in C# using NativeAOT. This part sets the expectations and setups the project, dealing with the first difficulties.
1309
Michal Strehovský @migeel.sk · 24/01/2025
Cool project: a hypervisor-based emulator for Windows x64 user-mode executables. One of my first thoughts upon seeing it - "I wonder if it's also possible to call the Windows hypervisor APIs from C#". github.com/x86matthew/W...
github.com
GitHub - x86matthew/WinVisor: WinVisor - A hypervisor-based emulator for Windows x64 user-mode executables using Windows Hypervisor Platform API
WinVisor - A hypervisor-based emulator for Windows x64 user-mode executables using Windows Hypervisor Platform API - x86matthew/WinVisor
0155
Reposted by Michal Strehovský
Kevin Gosse @kevingosse.net · 07/01/2025
I published part 5 of my "Writing a .NET profiler in C#" series. All the foundations built in the previous articles have been moved to a library named Silhouette. In this new article, we finally have everything we need to write an actual profiler. minidump.net/writing-a-ne... #dotnet
minidump.net
Writing a .NET profiler in C#  -  Part 5
Part 5 of the series about using NativeAOT to write a .NET profiler in C#. We have all the foundations, we’re finally writing an actual profiler.
12811
Reposted by Michal Strehovský
Kirill Osenkov @kirillosenkov.com · 29/12/2024
Finally had time over the holidays to realize a long-standing dream of mine: a hex editor that knows about the PE file and .NET metadata format. You can click any byte and it will show you which data structure it is in the tree. Every byte is covered. The parser is at github.com/KirillOsenko...
Screenshot of a hex editor with a PE file open, on the left there's a tree with the headers, sections and other parts of the file format. On the right there's a typical table of bytes in hex.
824264
Reposted by Michal Strehovský
Kyle Kukshtel @kkukshtel.bsky.social · 29/12/2024
got my custom sokol-backed c# game engine zinc compiling to wasm using nativeaot-llvm! and for anyone else headed in a similar direction, I spent some time writing up what it took, what bugs I encountered, etc! give it a read here #gamedev #zinc #csharp kylekukshtel.com/csharp-wasm-...
kylekukshtel.com
So You Want To Compile Your C# Game Engine To The Web With WASM - k-hole
Diving into the NativeAOT-LLVM compile chain to make my game engine work on the web
3226
Michal Strehovský @migeel.sk · 19/12/2024
For native DLLs you could try Sizebench or Bloaty. For managed DLLs I don't know of a tool.
100
Michal Strehovský @migeel.sk · 19/12/2024
That's essentially how it's set up. sizoscope is compiled with PublishAot. There is a dotnet tool that launches it. If you're on non-Windows, the dotnet tool will launch sizoscope through Wine. If you don't have Wine, it will tell you to install it.
010
Michal Strehovský @migeel.sk · 19/12/2024
Works fine under Wine on Linux, I just ran it like that today. If you have Wine installed, it will "just work". Win32 is the only stable usermode ABI on Linux; shipping Linux-native binaries of a UI app is just endless pain making Snaps and dealing with Arch users.
110