Skip to content

Update to SpiderMonkey 140#255

Merged
tschneidereit merged 13 commits intomainfrom
ff140
Aug 6, 2025
Merged

Update to SpiderMonkey 140#255
tschneidereit merged 13 commits intomainfrom
ff140

Conversation

@tschneidereit
Copy link
Copy Markdown
Member

This is a big change in that it doesn't just do a SpiderMonkey update, but also changes how SpiderMonkey is integrated in the first place:

Instead of having the external spidermonkey-wasi-embedding repo doing debug/release builds of SpiderMonkey as a static library, and StarlingMonkey just pulling those in, with this PR the build is integrated into StarlingMonkey's CMake setup.

The build system is still prepared to make use of pre-generated binaries, but right now nothing produces and publishes those. I'll follow this up with more commits adding both caching for CI and publishing of the binaries. Once that's done, hopefully the setup introduced here will just work with them. If not, I'll tweak things accordingly.

@tschneidereit
Copy link
Copy Markdown
Member Author

One sad note: with this update, we'll lose weval support for the time being. I'll add commits here to disable weval builds and tests, and update the documentation.

See this Zulip message (and earlier ones in the conversation) for details on the reason.

Copy link
Copy Markdown
Member

@andreiltd andreiltd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic! 🚀

@tschneidereit tschneidereit force-pushed the ff140 branch 2 times, most recently from 338f949 to 1cb8b93 Compare August 2, 2025 13:31
Instead of relying on the external [spidermonkey-wasi-embedding](https://github.com/bytecodealliance/spidermonkey-wasi-embedding) repo doing debug/release builds of SpiderMonkey as a static library, and StarlingMonkey just pulling those in, with this commit the build is integrated into StarlingMonkey's CMake setup.

The build system is still prepared to make use of pre-generated binaries, but right now nothing produces and publishes those. I'll follow this up with more commits adding both caching for CI and publishing of the binaries. Once that's done, hopefully the setup introduced here will just work with them. If not, I'll tweak things accordingly.
This includes a few changes:

- Disable weval in CI, since we unfortunately don't have weval support anymore for the time being
- Cache SpiderMonkey builds in CI
- Upload SpiderMonkey build artifacts in CI
CPM, via CMake's `ExternalProject`, [doesn't actually do shallow clones of git repositories](https://gitlab.kitware.com/cmake/cmake/-/issues/17770). Instead, it forces fetching all branches, not even just the default branch. That makes cloning the firefox repo take a very very long time :(

So instead, we spend 90 lines of lovely CMake script handling the cloning process ourselves ❤️

Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
Same as the Firefox one, this is a very large repo, which takes a long time to clone when done CPM way. This commit generalizes the repo handling used for the SpiderMonkey sources, and applies it to WPT, too.

Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
Good to do, but here mainly done to trigger a re-run of CI.

Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
Mainly to trigger another build and hopefully see the cached SpiderMonkey build working.

Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
…Monkey

This is a lot of yaml code to automate releasing of pre-built SpiderMonkey libraries for all build configs whenever the version of SpiderMonkey used is changed.

These releases are done on merge to `main`, and will be picked up automatically by StarlingMonkey's build system.
@tschneidereit
Copy link
Copy Markdown
Member Author

@andreiltd I think this is ready now. Over in my fork I tested out the automatic releasing, and it seems to all work.

Since I changed a whole bunch of stuff since your last review, I'd appreciate another look.

@tschneidereit
Copy link
Copy Markdown
Member Author

oh, and apologies for the force-pushes. This was impossible to work through without iterating on a pending PR, I'm afraid

CPM kept overriding this with the helpful value `"OFF"`. No more, CPM, no more.

Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
Copy link
Copy Markdown
Member

@andreiltd andreiltd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had some questions posted above, but none of these are blocking. LGTM! 🚀

@tschneidereit
Copy link
Copy Markdown
Member Author

Oh right, sorry: I had addressed them, but never replied.

@tschneidereit
Copy link
Copy Markdown
Member Author

I'll hold off on merging this until we have the release out, as agreed.

tschneidereit added a commit that referenced this pull request Aug 6, 2025
This is a large commit with a grab-bag of changes needed (or nice to have) to get this PR to work on top of #255.

The bindings are still pretty rough, but the result passes the test suite, so at least nothing existing is broken by it.

I'd like to get this landed soon-ish and iterate on things from here.

Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
@tschneidereit
Copy link
Copy Markdown
Member Author

Now that we have a release without this update, I'll go ahead and land this.

@tschneidereit tschneidereit merged commit 5029b92 into main Aug 6, 2025
5 checks passed
@tschneidereit tschneidereit deleted the ff140 branch August 6, 2025 18:06
tschneidereit added a commit to tschneidereit/StarlingMonkey that referenced this pull request Sep 11, 2025
This is a large commit with a grab-bag of changes needed (or nice to have) to get this PR to work on top of bytecodealliance#255.

The bindings are still pretty rough, but the result passes the test suite, so at least nothing existing is broken by it.

I'd like to get this landed soon-ish and iterate on things from here.

Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
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.

2 participants