Skip to content

Commit 37e1621

Browse files
committed
Description of .NET build output
1 parent b0353a6 commit 37e1621

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

wasm/dotnet/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,17 @@ Download .NET SDK 9.0.3xx
1414
Run `build.sh` script. It will install `wasm-tools` workload & build the benchmark code twice (for Mono interpreter & AOT).
1515

1616
To run the benchmark code on `jsc`, we need to remove the unguarded use of `import.meta.url` in `dotnet.js`.
17+
18+
## Background on .NET / build output files
19+
20+
Mono AOT works in a "mixed mode". It is not able to compile all code patterns and in various scenarios it falls back to interpreter.
21+
Because of that we are still loading managed dlls (all the other not-`dotnet.native.wasm` files).
22+
23+
Structure of the build output
24+
25+
- `dotnet.js` is entrypoint JavaScript with public API.
26+
- `dotnet.runtime.js` is internal implementation of JavaScript logic for .NET.
27+
- `dotnet.native.js` is emscripten module configured for .NET.
28+
- `dotnet.native.wasm` is unmanaged code (Mono runtime + AOT compiled code).
29+
- `System.*.wasm` is .NET BCL that has unused code trimmed away.
30+
- `dotnet.wasm` is the benchmark code.

0 commit comments

Comments
 (0)