File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
crates/cli-support/src/js Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -414,6 +414,9 @@ impl<'a> Context<'a> {
414
414
415
415
if needs_manual_start {
416
416
footer. push_str ( "\n wasm.__wbindgen_start();\n " ) ;
417
+ if self . start_found {
418
+ footer. push_str ( "\n wasm.__wbindgen_main();\n " ) ;
419
+ }
417
420
}
418
421
}
419
422
@@ -428,6 +431,9 @@ impl<'a> Context<'a> {
428
431
429
432
if needs_manual_start {
430
433
footer. push_str ( "\n wasm.__wbindgen_start();\n " ) ;
434
+ if self . start_found {
435
+ footer. push_str ( "\n wasm.__wbindgen_main();\n " ) ;
436
+ }
431
437
}
432
438
}
433
439
@@ -461,7 +467,10 @@ impl<'a> Context<'a> {
461
467
}
462
468
463
469
if needs_manual_start {
464
- start = Some ( "\n wasm.__wbindgen_start();\n " . to_string ( ) ) ;
470
+ let start = start. insert ( "\n wasm.__wbindgen_start();\n " . to_string ( ) ) ;
471
+ if self . start_found {
472
+ start. push_str ( "\n wasm.__wbindgen_main();\n " ) ;
473
+ }
465
474
}
466
475
}
467
476
You can’t perform that action at this time.
0 commit comments