Is there any plan to have this interoperability with nodejs? Asking a question out of curiosity the project looks fantastic
Do you mean compiling nodejs to wasm using StarlingMonkey as JS engine? I don't think that is realistic. Nodejs is based on V8, which has a significantly different API than SpiderMonkey and thus StarlingMonkey. There seems to have been an experiment to run nodejs on top of SpiderMonkey a while ago, but it hasn't been maintained for over 7 years: https://github.com/mozilla/spidernode
It might be reasonable to support some of the NodeJS APIs (e.g. node:fs/promises
) in StarlingMonkey or an adjacent library.
I think support for node_modules could be interesting, as in adding node_modules to the module path for StarlingMonkey, but in general it should be able to run at least most js libraries that target browsers
I was under the impression that the plan was to get StarlingMonkey compatible with WinterCG APIs, but @Guy Bedford and @Till Schneidereit would certainly know more than me
Yes, StarlingMonkey is going in the direction of supporting full Node.js compat, it will still take some time, but that is very much a goal
Last updated: Dec 23 2024 at 14:03 UTC