@@ -31,7 +31,6 @@ import {
3131 mono_load_runtime_and_bcl_args , mono_wasm_load_config ,
3232 mono_wasm_setenv , mono_wasm_set_runtime_options ,
3333 mono_wasm_load_data_archive , mono_wasm_asm_loaded ,
34- mono_wasm_set_main_args ,
3534 mono_wasm_pre_init ,
3635 mono_wasm_runtime_is_initialized ,
3736 mono_wasm_on_runtime_initialized
@@ -68,6 +67,7 @@ import {
6867import { create_weak_ref } from "./weak-ref" ;
6968import { fetch_like , readAsync_like } from "./polyfills" ;
7069import { EmscriptenModule } from "./types/emscripten" ;
70+ import { mono_on_abort , mono_run_main , mono_run_main_and_exit } from "./run" ;
7171
7272const MONO = {
7373 // current "public" MONO API
@@ -81,6 +81,8 @@ const MONO = {
8181 mono_wasm_new_root_buffer,
8282 mono_wasm_new_root,
8383 mono_wasm_release_roots,
84+ mono_run_main,
85+ mono_run_main_and_exit,
8486
8587 // for Blazor's future!
8688 mono_wasm_add_assembly : cwraps . mono_wasm_add_assembly ,
@@ -157,6 +159,10 @@ function initializeImportsAndExports(
157159 Configuration
158160 }
159161 } ;
162+ if ( exports . module . __undefinedConfig ) {
163+ module . disableDotnet6Compatibility = true ;
164+ module . configSrc = "./mono-config.json" ;
165+ }
160166
161167 // these could be overriden on DotnetModuleConfig
162168 if ( ! module . preInit ) {
@@ -271,6 +277,10 @@ function initializeImportsAndExports(
271277 } ) ;
272278 }
273279
280+ if ( ! module . onAbort ) {
281+ module . onAbort = ( ) => mono_on_abort ;
282+ }
283+
274284 // this code makes it possible to find dotnet runtime on a page via global namespace, even when there are multiple runtimes at the same time
275285 let list : RuntimeList ;
276286 if ( ! globalThisAny . getDotnetRuntime ) {
@@ -345,7 +355,6 @@ const INTERNAL: any = {
345355 mono_wasm_enable_on_demand_gc : cwraps . mono_wasm_enable_on_demand_gc ,
346356 mono_profiler_init_aot : cwraps . mono_profiler_init_aot ,
347357 mono_wasm_set_runtime_options,
348- mono_wasm_set_main_args : mono_wasm_set_main_args ,
349358 mono_wasm_exec_regression : cwraps . mono_wasm_exec_regression ,
350359 mono_method_resolve, //MarshalTests.cs
351360 mono_bind_static_method, // MarshalTests.cs
0 commit comments