Skip to content

Add NightMonkey support. - #356

Open
cfallin wants to merge 1 commit into
bytecodealliance:mainfrom
cfallin:cfallin/nightmonkey
Open

cfallin wants to merge 1 commit into
bytecodealliance:mainfrom
cfallin:cfallin/nightmonkey

Conversation

@cfallin

@cfallin cfallin commented Sep 23, 2026

Copy link
Copy Markdown
Member

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.

Depends on bytecodealliance/StarlingMonkey#323 and bytecodealliance/nightmonkey#1.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant