Stream: jco

Topic: componentize spidermonkey?


view this post on Zulip Ralph (Feb 23 2024 at 11:08):

Hey @Guy Bedford, have you thought about enabling a mode where .js can be the "parent" component but the js engine -- spidermonkey in this case -- is a component that the parent component invokes? (or vice versa, depending on the most productive order)? Sort of like Javy's javy emit-provider command.

view this post on Zulip Guy Bedford (Feb 23 2024 at 17:32):

Treating spidermonkey itself as an import is very much a goal if that is what you mean?

view this post on Zulip Guy Bedford (Feb 23 2024 at 17:32):

we have a tracking issue for this in https://github.com/bytecodealliance/ComponentizeJS/issues/66

Problem The size of wasm module produced is quite high, ~ 8 MB for a function adding two numbers. My understanding is that the interpreter (SpiderMonkey) is the majority of it. Query Is there a way...

view this post on Zulip Guy Bedford (Feb 23 2024 at 17:33):

that would allow generating JS components that are much smaller, but then share the same spidermonkey base component

view this post on Zulip Ralph (Feb 23 2024 at 17:35):

Yup. While one off, trivial work like adding numbers doesn't make sense, having a cached engine component ready for reuse in a centralized service really does. The user component just delivers the .js files.

view this post on Zulip Guy Bedford (Feb 23 2024 at 18:34):

yes, exactly, there's techniques to do this, we just haven't yet put pressure on prioritising that to date


Last updated: Dec 23 2024 at 12:05 UTC