dotnet-wasi-sdk icon indicating copy to clipboard operation
dotnet-wasi-sdk copied to clipboard

Debug and Release build to the same (unoptimised?) Wasm

Open RReverser opened this issue 2 years ago • 1 comments

It appears that right now choosing the Release configuration via

dotnet build --configuration Release

doesn't change anything:

FullName                                                                     Length
--------                                                                     ------
C:\Users\me\Documents\MyFirstWasiApp\bin\Debug\net7.0\MyFirstWasiApp.wasm   8884056
C:\Users\me\Documents\MyFirstWasiApp\bin\Release\net7.0\MyFirstWasiApp.wasm 8884056

I was expecting the Release output to be smaller as it would be built with optimisations enabled.

RReverser avatar Feb 28 '23 11:02 RReverser

Hm I see there's separate WASI config under the dotnet/runtime repo that does support optimisation flags already: https://github.com/dotnet/runtime/blob/main/src/mono/wasi/wasi.proj

Should we use that over this SDK?

RReverser avatar Feb 28 '23 12:02 RReverser