4 ms·
The problem with blazor is that the only thing that is in webassembly is the bytecode interpreter and not your code. More is currently problematic because too m
by legulere 6y ago
The problem with blazor is that the only thing that is in webassembly is the bytecode interpreter and not your code. More is currently problematic because too much C# code relies on reflection making AOT difficult and webassembly not having garbage collection integration yet.
- hackerfromthefu 6y agoThat is not correct, or not the full story. Blazor has two separate modes, 'Server Side' and 'Web Assembly'. What you're describing is the server side mode. The second mode, called Web Assembly, compiles your code to WASM that is executed in the browser. https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-3.1 https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-... Also, "The .NET 5.0 core framework libraries have been annotated to indicate what works in the WebAssembly runtime, so developers now get a warning in the code editor when attempting to call an unsupported method." from https://www.theregister.com/2020/10/15/microsoft_emits_net_50_go/ https://www.theregister.com/2020/10/15/microsoft_emits_net_5...
- legulere 6y agoNope the server version has no Webassembly at all. The Webassembly version lets a .NET IL interpreter in WA running your code.
- ablekh 6y agoThank you for mentioning this. Your first sentence is true, but only for the current JIT-compiled option. Even in this case, Blazor is still functionally (i.e., excluding performance aspect) comparable with Rust WebAssembly option (and any other WASM-targeted language options, for that matter). Assuming that relevant AOT challenges would be solved as planned, it would make Blazor an option fully (i.e., including performance-wise) comparable with Rust WebAssembly.