Hey,
I have a mozjs branch with weval patches and IC corpus rebuild here:
https://github.com/andreiltd/mozjs/tree/weval
There are 5 commits added on top of current mozjs patches:
mozjs-sys ,It's hard to test end-to-end without componentization implementation in place but hopefully this patches will be useful very soon.
One thing worth clarifying up front is how the componentization pipeline works in starlingmonkey-ng, and where weval should fit into it.
My assumption is that you’ll be running wizer on a component rather than on a core module. If that’s the case, simply replacing wizer with weval likely won’t work. Ideally, we should add component support to weval so it can operate at the same point in the pipeline.
very nice, thank you! :heart:
Yes, we'll need to add component support to weval, unfortunately: we'll not be using wasip1 calls at all in -ng, so a non-component approach couldn't possibly work. Is that something you'd be up for working on as well?
Hey, yeah, I will allocate some time to work on that next week. My plan for that would be to just copy whatever wizer is doing for components to weval. I assume Chris will be onboard with supporting components in weval? (I won't ping him here, I think he's on vacation).
I'd be very surprised if Chris was opposed to this idea :slight_smile:
(ghost-of-cfallin appears [yes, need to work on my PTO discipline]: absolutely we should support components in weval. weval uses wizer as a library to get the snapshot that it then operates on; with a component snapshot, one would need to pull it apart into core modules, find the relevant one, then process that with the translate-to-IR-with-waffle / p-eval / re-compile flow, then put the component back together. lots of plumbing but nothing fundamentally hard AFAICS)
Hey, @Till Schneidereit , I wanted to clarify one more thing: how do you plan to use wizer in starlingmonkey-ng: cli or lib API? Currently weval is cli only, would that be an issue?
Hmm, good question. I think it might be an issue, because the integration will look a bit different. If it's not somehow very difficult to do, support lib use for weval would be good, I think
that seems like a pretty simple refactor to weval's toplevel -- the core is really a function weval(CoreModule) -> CoreModule so if an existing library user is doing the wizening, all it needs to do is pull out the right core module and give it to weval via that API
I have component support pretty much implemented now, but it needs some more testing. I will have PR tomorrow and then I can refactor the lib.
https://github.com/bytecodealliance/weval/pull/31
Last updated: Jul 29 2026 at 05:03 UTC