This commit is a beautiful thing, making a JSC module loader implemented in C available itself to JavaScript: https://git.sr.ht/~aperezdc/kiln/commit/992f457b569967afff32c38fa28c96153e134df4
🐔️🥚️🐣️
@tristan957 it's an experiment trying to provide loadable native C/C++ modules which manipulate the JS execution context—for example to add new custom JS APIs.
The main goals are:
a.) Modules can be used both with #WebKitGTK and #WPEWebKit.
b.) Modules work both on a full-fledged WebKitWebView (as part of a web process extension) and on a standalone JSCContext.
c.) A small library is provided to integrate module loading in applications.
@tristan957 Of course some limitations will apply. Case example: if some native module depends on the DOM, it cannot possibly work on a standalone JSCContext.
Trying to provide DOM APIs in a plain JSCContext outside a WebKitWebView is a non-goal.
@aperezdc What does your repo do Adrian?