Pushing C# to new places with NativeAOT
summary
Claims that .NET 7 NativeAOT produces standalone native binaries and unlocks new interop are demonstrated with concrete techniques: using Marshal.GetFunctionPointerForDelegate and source generators to fabricate vtables and exports, using nativeLibrary.GetExport / dlopen dlsym (written as nativeLibrary.GetExport) and ELF symbol parsing to bind LLDB symbols, and a C++ loader shim to register a custom GC. Built artifacts: a working native profiler, a fragile but functioning LLDB plugin, and a .NET GC prototype that only runs with the C++ loader workaround.
AI-written summary · about
chapters (15)
- 0:00NativeAOT introduction
- 1:26NativeAOT vs ReadyToRun
- 3:13Native interoperability
- 3:34Writing a .NET profiler
- 9:58Profiler interface in C#
- 13:34Source generators for boilerplate
- 18:15Testing the profiler
- 21:02Writing LLDB debugger extension
- 26:24Dynamic function location
- 31:23Symbol resolution challenges
- 37:09Fixing struct return issues
- 39:40Writing a .NET GC
- 43:58Overcoming GC conflicts
- 46:21NativeAOT interoperability limits
- 47:03Q&A on NativeAOT
related talks
46mDeep dive into .NET performance and native AOT
46mXamarin.iOS: Transforming your .NET into native code
01h 00mWriting a .NET Core cross platform profiler in an hour
50mWhy I'm Not Leaving .NET
01h 03mQ&A – Ask the #dotNET team
01h 03mOpening Keynote: Building and Scaling Cloud Native Intelligent Apps with .NET 8
44m.NET 11 in depth: Runtime, libraries, and SDK for the AI era
56m.NET 5: runtimes
