AOT
By default, the only thing that is running as WebAssembly in a Blazor WebAssembly app is the runtime. Everything else is ordinary .NET assemblies running on the browser using a .NET Intermediate Language (IL) interpreter implemented in WebAssembly.
I was not too fond of that when I first started to play around with Blazor, it felt wasteful to run everything using IL instead of something the browser would understand natively.
Then I thought the browser was running the same code as I would on the server. The same code! In the browser. That is pretty amazing!
We do, however have the option to compile directly to WebAssembly; this is called AOT; Ahead-of-time compilation.
It has a downside: the app download size will increase but run and load faster.
An AOT-compiled app is generally twice the size of an IL-compiled app.
AOT will take the .NET code and compile that directly into WebAssembly.
AOT does not trim managed assemblies and more code is needed to represent high-level .NET IL instructions...