Stream: wasmtime

Topic: nodejs interop for StarlingMonkey


view this post on Zulip Ashanti Mutinta (Aug 02 2024 at 13:45):

Is there any plan to have this interoperability with nodejs? Asking a question out of curiosity the project looks fantastic

view this post on Zulip bjorn3 (Aug 02 2024 at 14:39):

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

Node.js on top of SpiderMonkey. Contribute to mozilla/spidernode development by creating an account on GitHub.

view this post on Zulip Joel Dice (Aug 02 2024 at 14:43):

It might be reasonable to support some of the NodeJS APIs (e.g. node:fs/promises) in StarlingMonkey or an adjacent library.

view this post on Zulip Ramon Klass (Aug 02 2024 at 14:49):

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

view this post on Zulip fitzgen (he/him) (Aug 02 2024 at 15:54):

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

view this post on Zulip Guy Bedford (Aug 02 2024 at 16:37):

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: Nov 22 2024 at 17:03 UTC