Pre-initialize with Wizer

22 views
Skip to first unread message

Dan C

unread,
Jun 18, 2021, 9:51:32 PM6/18/21
to emscripten-discuss
Hi everyone,

I recently came across this tool https://github.com/bytecodealliance/wizer, which doesn't seem designated for Emscripten. I'm wondering whether anyone had any luck with it.

Thanks,
Dan

Thomas Lively

unread,
Jun 19, 2021, 11:31:41 AM6/19/21
to emscripte...@googlegroups.com
I believe Emscripten used to have a similar feature, but we had to disable it because it turned out that we depended on JS setting some values in memory before running the Wasm code and the pre-evaluation tool couldn’t account for that. I’m not sure whether that situation has changed, though.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/f8abb27a-95b6-458c-bac9-35a9be0c31cfn%40googlegroups.com.

Sam Clegg

unread,
Jun 19, 2021, 8:15:15 PM6/19/21
to emscripte...@googlegroups.com
The emscripten feature only worked for running static constructors I believe (We should resurrect that feature in binaryen!).  Wizer actually tries to run as much of `main` as it can too.     

I don't see any reason why emscripten and wizer couldn't be used together but I don't know of any attempts to do so.  One wrinkle is that, unlike with wasi executables, not all emscripten programs have a single `main` entry point, but act more like libraries for JS programs.

Reply all
Reply to author
Forward
0 new messages