Does AOT + IL removal really work with BlazorWASM? #105635
-
Hi, I'm trying to do a Blazor Webassembly app on net 8. One of the requirements is compiling it with AOT and removing IL data. I'm following this: https://learn.microsoft.com/en-us/aspnet/core/blazor/webassembly-build-tools-and-aot?view=aspnetcore-8.0 Basically I create the project
Edit the project to add the AOT bits
And then just publish
It takes a while to compile and at the end I have files at \bin\Release\net8.0\publish However, if I go to wwwroot\_framework, and I wasm2wat the main wasm BlazorApp.wasm (or any other WASM, for that matter) it seems like the file still contains webcil. These are the content headers:
Is this really native wasm, or is the webcil still being kept in the .wasm files? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
This is the goal of NativeAOT-LLVM, which is still in experiment. |
Beta Was this translation helpful? Give feedback.
-
I don't understand. The microsoft article I linked says nothing about being experimental, and gives concrete instructions on how to AOT and stripe IL. Maybe I'm mixing two different concepts? (I'm quite new to wasm) |
Beta Was this translation helpful? Give feedback.
The WASM AOT in the article you linked is a different technology from NativeAOT-LLVM and supported since .NET 6, and cannot always completely remove IL.