src/native/corehost/browserhost/ReadMe.md
Emscripten application and JavaScript wrapper and a loader for it.
It loads application manifest and based on the manifest, it downloads other JS modules, managed assemblies and other assets. It plays role of a host and a public API for JavaScript user code. It's good to keep this file small, so that it could start the download cascade as soon as possible. It's JavaScript ES6 module
loader/dotnet.ts compiled -> dotnet.jsImplements native part of the CoreCLR host and exposes it as an internal JavaScript interface to the loader. It is Emscripten application statically linked from libraries.
libSystem.Native.Browser.js linked -> dotnet.native.jslibSystem.Native.Browser.Utils.js linked -> dotnet.native.jslibSystem.Runtime.InteropServices.JavaScript.Native.js linked -> dotnet.native.jslibSystem.Native.Browser.a linked -> dotnet.native.wasmlibSystem.Runtime.InteropServices.JavaScript.Native.a linked -> dotnet.native.wasmhost/index.ts -> compiled -> libBrowserHost.js linked -> dotnet.native.jshost/libBrowserHost.footer.js -> compiled -> libBrowserHost.js linked -> dotnet.native.jshost/browserhost.cpp compiled -> libBrowserHost.a linked -> dotnet.native.wasmempty.c compiled + linked -> dotnet.native.wasmTypeScript is compiled by src/native/rollup.config.js
JavaScript tools like npm, tsc, rollup are installed in src/native/package.json.
JS tools depend on nodeJS installation of Emscripten.
Emscripten compilations is part of src/native/corehost/CMakeLists.txt
Final app static linking happens here in CMakeLists.txt