As more applications target .Net in the Browser there is a growing demand to support workloads that require additional performance. The .NET5 browser-wasm runtime supports only interpreted mode and can considerably underperform in performance-sensitive code paths. Large performance gains can be realized by compiling the code ahead of time (AOT) rather than interpreting it.
Performance, size, and other considerations dictate that the AOT compilation step should run after assemblies have been aggressively trimmed. This will require that additional tooling be installed on the developer's machine when targeting AOT, including native and managed cross compilers appropriate for their host environment (emscripten SDK and mono AOT).
AOT compilation also typically generates much less compact code than the original IL. To avoid prohibitively large assets, we will likely need to offer a mode of operation where performance critical code is AOT compiled and the remaining code is interpreted.
Work Items
As more applications target .Net in the Browser there is a growing demand to support workloads that require additional performance. The .NET5 browser-wasm runtime supports only interpreted mode and can considerably underperform in performance-sensitive code paths. Large performance gains can be realized by compiling the code ahead of time (AOT) rather than interpreting it.
Performance, size, and other considerations dictate that the AOT compilation step should run after assemblies have been aggressively trimmed. This will require that additional tooling be installed on the developer's machine when targeting AOT, including native and managed cross compilers appropriate for their host environment (emscripten SDK and mono AOT).
AOT compilation also typically generates much less compact code than the original IL. To avoid prohibitively large assets, we will likely need to offer a mode of operation where performance critical code is AOT compiled and the remaining code is interpreted.
Work Items