How to produce single WASM file using WASI SDK C#

498 Views Asked by At

How to produce single WASM file using .NET WASI SDK? Here is my project file

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

Currently WASI SDK produce dotnet.wasm + myapp.dll, but I would like to have dotnet.wasm + myapp.wasm

1

There are 1 best solutions below

0
codevision On

You should use.

<WasmSingleFileBundle>true</WasmSingleFileBundle>