MCPcopy Create free account
hub / github.com/buke/quickjs-go / GoModuleInitProxy

Function GoModuleInitProxy

bridge.c:1157–1165  ·  view source on GitHub ↗

Module initialization proxy function - C wrapper for Go export This function serves as a bridge between QuickJS C API and Go ModuleBuilder functionality Called by QuickJS when a module is being initialized Corresponds to JSModuleInitFunc signature: int (*)(JSContext *ctx, JSModuleDef *m)

Source from the content-addressed store, hash-verified

1155// Called by QuickJS when a module is being initialized
1156// Corresponds to JSModuleInitFunc signature: int (*)(JSContext *ctx, JSModuleDef *m)
1157int GoModuleInitProxy(JSContext *ctx, JSModuleDef *m) {
1158 // Call the Go export function which handles the actual module initialization logic
1159 // The Go function will:
1160 // 1. Retrieve the ModuleBuilder from module private value
1161 // 2. Set all export values using JS_SetModuleExport
1162 // 3. Call user initialization function if provided
1163 // 4. Handle error cases and resource cleanup
1164 return goModuleInitProxy(ctx, m);
1165}

Callers

nothing calls this directly

Calls 1

goModuleInitProxyFunction · 0.85

Tested by

no test coverage detected