Dynamic Runtime Code with Roslyn

A possibly overlooked feature of the Roslyn compiler is the ability to generate, compile, and load new types at runtime. Sure, we've always had *some* ability to use dynamic code in .Net, but the existing techniques were either slow (Reflection) or daunting to use (IL generation or Expressions). Now though, we can just use C# in a way that's both more approachable for more developers and lends itself to more ambitious levels of dynamic behavior.

In this talk I'll show some of the ways I've been using this technique to create more efficient, low allocation application frameworks. We'll also dive into the Utf8Json library already uses this approach today in its support for very highly efficient Json parsing.