1

In my Blazor WebAssembly application I can see myapp.dll and the .Net Framework DLLs downloaded in the browser, but as the browser can only execute the webassembly language (.wasm), are these dll files converted or compiled to the webassembly language as required at runtime?

2 Answers 2

2

The .Net Framework DLLs downloaded in the browser are never get converted to webassembly. Only the Mono runtime is compiled to WebAssembly, and your .Net dlls are executed as is under Mono.

One thing that sticks out in this implementation is that rather than compiling every bit of .NET code that your application runs to WASM, only the Mono Runtime is compiled as a WASM module. All of the Blazor framework and your application code is loaded as plain old .NET assemblies that are executed through Mono.

Read more:

Sign up to request clarification or add additional context in comments.

Comments

2

The .net binaries contain IL code that currently is interpreted by the RunTime. Only the RunTime itself is compiled to Wasm.

Interpretation is not the fastest option, a lot of effort has gone into speeding it up in the Net5 release.

Blazor is fast enough for normal UI tasks. But for example deserializing (very) large JSON messages is clearly slower than in normal .net.

A future runtime could add a compiler (JIT or AOT). We will have to wait.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.