Stream: ComponentizeJS

Topic: componentize-js backed by `quickjs`


view this post on Zulip Tomasz Andrzejak (Feb 18 2026 at 17:29):

I've recently been working on a experimental version of componentize-js backed by the quickjs runtime. The goal of the project is to produce tiny components with an embedded JS runtime. With size optimizations enabled, the hello world component comes in at roughly 750KB. It supports wizer and wasi stubbing. Maybe someone will find this useful.

thanks @Joel Dice for all the help.

https://github.com/andreiltd/componentize-qjs

view this post on Zulip Ralph (Feb 19 2026 at 17:04):

@Saúl Cabrera :-)

view this post on Zulip Tomasz Andrzejak (Mar 16 2026 at 10:44):

An update on this: the components produced by componentize-qjs now supports p3 semantics: async/futures/streams.

view this post on Zulip Joel Dice (Mar 16 2026 at 13:49):

I don't know how practical it would be, but it would be great if we could combine the SpiderMonkey-backed and QuickJS-backed projects and let the user pick a runtime via e.g. a CLI option, ideally with no code changes on their side, assuming they stay within the subset of features that both runtimes provide.

view this post on Zulip Tomasz Andrzejak (Mar 16 2026 at 14:05):

I think it makes a lot of sense! I could give it a try (move quickjs runtime into your project) and see what are the blockers. Off the top of my head, I think I relied on slightly different linking model to keep the binary size small: instead of providing dynamic libc.so to the component linker, I linked libc statically into runtime. The result is that linker will dce a lot from libc (around 1M IIUC).

view this post on Zulip Joel Dice (Mar 16 2026 at 14:07):

Makes sense. I don't think we'll do that with SpiderMonkey since we plan on using dynamic linking to provide optional native extensions, but it makes sense for minimizing binary size for QuickJS.

view this post on Zulip Tomasz Andrzejak (Mar 16 2026 at 14:12):

Yeah, I see the tiny size as a main selling point of qjs runtime, but I think if we sprinkle enough "ifs" we can do both dynamic and static linking :)

view this post on Zulip Tomasz Andrzejak (Mar 16 2026 at 14:17):

Do you plan to allow selectively enable compatibility layers, like for example if I only need a console I can do --compat consle and it will add the console extension to the linker? Is that what you mean by optional extensions?

view this post on Zulip Joel Dice (Mar 16 2026 at 14:22):

@Till Schneidereit can probably say more about how he wants to use dynamic linking in StarlingMonkey, but yes, I think you have the right idea. For example, if you wanted to use an extension that implements Node.js's fs module, that would be packaged as a .so file, but not necessarily linked in by default.


Last updated: Mar 23 2026 at 18:16 UTC