@@ -9,14 +9,12 @@ class ThreadRegistry {
99 workers = new Map ( ) ;
1010 nextTid = 1 ;
1111
12- constructor ( { configuration } ) {
13- this . configuration = configuration ;
14- }
12+ constructor ( ) { }
1513
1614 spawnThread ( worker , module , memory , startArg ) {
1715 const tid = this . nextTid ++ ;
1816 this . workers . set ( tid , worker ) ;
19- worker . postMessage ( { module, memory, tid, startArg, configuration : this . configuration } ) ;
17+ worker . postMessage ( { module, memory, tid, startArg } ) ;
2018 return tid ;
2119 }
2220
@@ -39,8 +37,8 @@ class ThreadRegistry {
3937 }
4038}
4139
42- async function start ( configuration = "release" ) {
43- const response = await fetch ( `./.build/${ configuration } /MyApp .wasm` ) ;
40+ async function start ( ) {
41+ const response = await fetch ( `./.build/plugins/PackageToJS/outputs/Package/main .wasm` ) ;
4442 const module = await WebAssembly . compileStreaming ( response ) ;
4543 const memoryImport = WebAssembly . Module . imports ( module ) . find ( i => i . module === "env" && i . name === "memory" ) ;
4644 if ( ! memoryImport ) {
@@ -51,7 +49,7 @@ async function start(configuration = "release") {
5149 }
5250 const memoryType = memoryImport . type ;
5351 const memory = new WebAssembly . Memory ( { initial : memoryType . minimum , maximum : memoryType . maximum , shared : true } ) ;
54- const threads = new ThreadRegistry ( { configuration } ) ;
52+ const threads = new ThreadRegistry ( ) ;
5553 const { instance, swiftRuntime, wasi } = await instantiate ( {
5654 module,
5755 threadChannel : threads ,
@@ -63,8 +61,7 @@ async function start(configuration = "release") {
6361 return threads . spawnThread ( worker , module , memory , startArg ) ;
6462 }
6563 } ;
66- } ,
67- configuration
64+ }
6865 } ) ;
6966 wasi . initialize ( instance ) ;
7067
0 commit comments