Repository navigation
Add NightMonkey support. - #356
Conversation
|
Hey @cfallin, just a heads-up, the fix for the CI has just been merged so you can try to rebase and see if it resolves failures in this PR. |
|
Working on updating this now that NightMonkey + StarlingMonkey integration have landed. Needs bytecodealliance/nightmonkey#7 (and then a version-hash bump in StarlingMonkey to pull it in), then I'll push my update here. |
a3b8541 to
b8cb546
Compare
NightMonkey is an ahead-of-time JS-to-Wasm compiler built on top of SpiderMonkey. This PR adds a `--nightmonkey` CLI flag that selects the NightMonkey variant of the engine, and invokes the NightMonkey compiler (which is a native binary) on a snapshotted image to AOT-compile JS bytecode into Wasm bytecode. Because the NightMonkey compiler itself is a native program, this PR incorporates binaries for four platforms (Linux/x86-64, Linux/aarch64, Windows/x86-64, macOS/aarch64) and bundles them all into the monolithic NPM package, adding ~25MiB. If we instead want to split out per-platform sub-packages and dynamically download them as needed, I am happy to do that instead.
cd255be to
dafa0c9
Compare
|
Looks like nightmonkey tests are passing in CI -- @andreiltd or @tschneidereit this should be ready for review now! |
tschneidereit
left a comment
There was a problem hiding this comment.
This looks good!
For StarlingMonkey-ng my plan is to always have NightMonkey support compiled into the runtime, so that no extra build is needed. I think it's entirely fine to follow weval precedent here and keep it as a separate binary, though.
|
Thanks! (Looks like I'm not able to merge here -- no write perms -- so please feel free to click the Big Green Button when able) |
NightMonkey is an ahead-of-time JS-to-Wasm compiler built on top of SpiderMonkey.
This PR adds a
--nightmonkeyCLI flag that selects the NightMonkey variant of the engine, and invokes the NightMonkey compiler (which is a native binary) on a snapshotted image to AOT-compile JS bytecode into Wasm bytecode.Because the NightMonkey compiler itself is a native program, this PR incorporates binaries for four platforms (Linux/x86-64, Linux/aarch64, Windows/x86-64, macOS/aarch64) and bundles them all into the monolithic NPM package, adding ~25MiB. If we instead want to split out per-platform sub-packages and dynamically download them as needed, I am happy to do that instead.
Depends on bytecodealliance/StarlingMonkey#323 and bytecodealliance/nightmonkey#1.