@gjsify/napi 0.25.1 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/meson.build +1 -1
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/libgjsifynapi.dylib +0 -0
- package/src/cc/module.cc +2 -2
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ and the servo prebuilt is a patched Rust static-lib layout, not the pkg-config
|
|
|
140
140
|
A **second wall** waits behind it: an unmodified node-gyp `.node` on Windows
|
|
141
141
|
binds `napi_*` via a delay-load hook against the host `.exe`, which `gjs.exe`
|
|
142
142
|
does not export (there is no POSIX global-namespace self-promotion analog). See
|
|
143
|
-
`
|
|
143
|
+
`status/open-todos.md` → *N-API host in GJS* → cross-platform prebuilds. This is the key
|
|
144
144
|
difference from [`@gjsify/node-gi`](../../node-gi/node-gi), which links the
|
|
145
145
|
portable girepository stack and so runs on all three OSes.
|
|
146
146
|
|
package/meson.build
CHANGED
|
@@ -58,7 +58,7 @@ cc_sources = files(
|
|
|
58
58
|
# resolves from the typelib. That closes the same hygiene contract the
|
|
59
59
|
# version-script/exported-symbols-list enforce elsewhere. The Windows build
|
|
60
60
|
# still requires a from-source gjs + mozjs-140 toolchain (clang-cl/MSVC; see
|
|
61
|
-
#
|
|
61
|
+
# status/open-todos.md "N-API host in GJS" cross-platform prebuilds + the `windows` job in
|
|
62
62
|
# napi.yml) — mozjs-140 is now obtainable (servo/mozjs prebuilt
|
|
63
63
|
# libmozjs-x86_64-pc-windows-msvc), the open wall is gjs-on-Windows itself.
|
|
64
64
|
host_system = host_machine.system()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/napi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Node-API (N-API) host for GJS — implements the napi C ABI over SpiderMonkey (mozjs-140) so GJS can load unmodified compiled .node addons. The forward mirror of @gjsify/node-gi (GI in Node); this is N-API in GJS. Vala/C++ shim as .so+.gir+.typelib prebuild, loaded via imports.gi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/esm/index.js",
|
|
Binary file
|
package/src/cc/module.cc
CHANGED
|
@@ -254,7 +254,7 @@ bool ensure_napi_symbols_global(JSContext* cx) {
|
|
|
254
254
|
// from the HOST executable (GetModuleHandle(NULL)) at first call; GJS's
|
|
255
255
|
// gjs.exe does not export the napi ABI, so unmodified-addon symbol binding
|
|
256
256
|
// needs the shim to satisfy that delay-load (a napi-exporting host EXE, or a
|
|
257
|
-
// delay-load-hook cooperation). Tracked in
|
|
257
|
+
// delay-load-hook cooperation). Tracked in status/open-todos.md → N-API host
|
|
258
258
|
// cross-platform → Windows. Here we only assert our own exports resolve so
|
|
259
259
|
// the rest of the load path stays intact once that wall is solved.
|
|
260
260
|
HMODULE self = nullptr;
|
|
@@ -269,7 +269,7 @@ bool ensure_napi_symbols_global(JSContext* cx) {
|
|
|
269
269
|
".def export configuration");
|
|
270
270
|
}
|
|
271
271
|
g_debug("gjsify-napi: shim exports the napi ABI (Windows: addon binding "
|
|
272
|
-
"relies on the delay-load host model — see
|
|
272
|
+
"relies on the delay-load host model — see status/open-todos.md)");
|
|
273
273
|
return true;
|
|
274
274
|
#else
|
|
275
275
|
void* ours = reinterpret_cast<void*>(&napi_create_reference);
|