Is there any chance gjs could support threading? Presumably SpiderMonkey has good support for WebWorkers and SharedArrayBuffer, but perhaps gjs relies on other components that aren’t thread-safe, or it would be too easy to break the thread safety by using certain introspected libraries?
I guess gjs is considered mainly as a simple scripting tool, but with Typescript and something like ts-for-gjs it can be so much more. I think GTK needs bindings for more mainstream strictly typed high-level languages to survive, and Typescript is surprisingly good. There are also GI bindings for node, but I think there are some incompatibilities in the API, and it could end up marginalising gjs, which would be a shame, because I suspect gjs has a lighter footprint, and it’s easy to dive straight into on any Linux distro (and even Mac) without all the baggage of npm.