~/talk

Exploring Source Generators

Talkat NDC Oslo 2022 · 2022-09-26..09-30· [dotnet, compilers-and-language-design]
links:none on file
slides:none on file

Shows how Roslyn APIs plus NuGet analyzers generate real C#: a Json serialization Source Generator that precompiles read/write logic (claiming ≈40% faster startup in some caching benchmarks), a logging generator that emits isEnabled checks and structs, a regex generator, LibraryImport/JS import marshalling for .NET 7, and a custom auto‑notify + builder generator built and validated via unit tests and Verify testing. Visual Studio 2022’s incremental generators reduce IDE rework; generators run, emit diagnostics, and the demos compile and execute.

AI-written summary · about

  1. 0:00Source Generators intro
  2. 1:07Why Source Generators
  3. 8:39Built-in .NET 6/7 generators
  4. 14:56Json Serialization with generators
  5. 15:16Logging optimization
  6. 18:18Razor views pre-compiled
  7. 20:03Regex compilation in .NET 7
  8. 22:13Native interop library import
  9. 26:47WebAssembly JS interop
  10. 30:07Custom generator tutorial
  11. 42:14Incremental generators in VS 2022
  12. 45:26Advanced generator features
  13. 49:43Deploying generators
  14. 51:07Real-world examples
  15. 51:57Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.