diff --git a/docs/using-nativeaot/compiling.md b/docs/using-nativeaot/compiling.md index 46057c169966..3f0bbcce5644 100644 --- a/docs/using-nativeaot/compiling.md +++ b/docs/using-nativeaot/compiling.md @@ -115,6 +115,16 @@ Note that assemblies other than the one being published (e. g. those from refere See also the [NativeLibrary sample](../../samples/NativeLibrary). +### WebAssembly Core Modules for WASI + +NativeAOT-LLVM by default will produce Wasi component modules using the `wasm32-unknown-wasip2` triple. If you need to produce WebAssemblyCore modules from a library project, add +```xml + + true + +``` +to your project file. This can be useful for uses that do not support WebAssembly components, e.g. extism. + ## WebAssembly module imports Functions in other WebAssembly modules can be imported and invoked using `DllImport` and `WasmImportLinkage` e.g. diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets index d1ea61f025f9..8218d4b454d7 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets @@ -125,7 +125,8 @@ The .NET Foundation licenses this file to you under the MIT license. -Oz wasm32-unknown-emscripten - wasm32-unknown-wasip2 + wasm32-unknown-wasip2 + wasm32-unknown-wasi 1048576 $(EmccStackSize) 1024 @@ -582,7 +583,7 @@ The .NET Foundation licenses this file to you under the MIT license. - +