You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Statically linking Emscripten LLVM Bitcode (`.o` and `.a` files) files to mono is supported on both Windows 10 and Linux. To build on Windows please refer to the AOT environment setup instructions.
9
+
Statically linking Emscripten LLVM Bitcode (`.o` and `.a` files) files is supported to embed `.o` or `.a` files with the rest of the WebAssembly modules. This allows for using p/invoke when resolving methods from the loaded native library.
10
10
11
-
This linking type embeds the `.o` or `.a`files with the rest of the WebAssembly modules, and uses _normal_ webassembly function invocations that are faster than with dynamic linking.
11
+
Files of type `.o` or `.a`specified in the MSBuild `WasmShellNativeFileReference` item will be statically linked in the application:
12
12
13
-
Any `.o` or `.a` file placed as `content` in the built project will be statically linked to the currently running application.
13
+
```xml
14
+
<ItemGroup>
15
+
<WasmShellNativeFileReferenceInclude="libMy.a" />
16
+
</ItemGroup>
17
+
```
18
+
19
+
`WasmShellNativeFileReference` also supports multi-version filtering specified below.
14
20
15
-
This allowing for p/invoke to be functional when resolving methods from the loaded module. If you have a `.o` or a `.a` file you don't want to be include in the linking, you may add the `UnoAotCompile="false"` metadata that way:
21
+
The .NET SDK [`NativeFileReference`](https://learn.microsoft.com/en-us/aspnet/core/blazor/webassembly-native-dependencies) is also supported.
22
+
23
+
### Support for Native Files as `Content`
24
+
25
+
Specifying native files as `Content` is also supported in version 9.x of the bootstrapper but will be removed in the next version.
26
+
27
+
When specified as Content, if you have a `.o` or a `.a` file you don't want to be include in the linking, you may add the `UnoAotCompile="false"` metadata that way:
16
28
17
29
```xml
18
30
<ItemGroup>
@@ -21,8 +33,6 @@ This allowing for p/invoke to be functional when resolving methods from the load
21
33
</ItemGroup>
22
34
```
23
35
24
-
The .NET SDK [`NativeFileReference`](https://learn.microsoft.com/en-us/aspnet/core/blazor/webassembly-native-dependencies) is also supported.
25
-
26
36
## WebAssembly Exceptions support
27
37
28
38
As of version 7.0 and later, WebAssembly Exceptions support is now required.
0 commit comments