@gjsify/napi 0.52.0 → 0.54.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/meson.build +7 -2
- package/package.json +7 -7
- package/src/cc/module.cc +1 -1
package/meson.build
CHANGED
|
@@ -4,11 +4,16 @@
|
|
|
4
4
|
# code compiled into ONE shared library + GIR + typelib. The native part here
|
|
5
5
|
# is C++ (JSAPI is C++); the shim is intrinsically pinned to GJS's mozjs
|
|
6
6
|
# major and must be rebuilt when GJS bumps (ADR 0011).
|
|
7
|
+
# `buildtype=plain` = NO `-g`. ld64 emits a DEBUG MAP into any image whose objects
|
|
8
|
+
# carry DWARF — one `N_OSO` stab per object, holding its MTIME — so with `-g` every
|
|
9
|
+
# rebuild of this commit differed in bytes (plus the `LC_UUID` and the ad-hoc signature
|
|
10
|
+
# computed over them) and `commit-prebuilds` re-committed all 16 darwin dylibs. That map
|
|
11
|
+
# names intermediate `.o` files no consumer can have. Why: docs/prebuilds.md.
|
|
7
12
|
project('GjsifyNapi', ['c', 'cpp', 'vala'],
|
|
8
13
|
version: '1.0',
|
|
9
14
|
# Match GJS's own build (refs/gjs/meson.build): C++17, no RTTI, no
|
|
10
15
|
# exceptions — mozjs-140 has no stable C++ ABI and is built the same way.
|
|
11
|
-
default_options: ['cpp_std=c++17'])
|
|
16
|
+
default_options: ['cpp_std=c++17', 'buildtype=plain'])
|
|
12
17
|
|
|
13
18
|
dependencies = [
|
|
14
19
|
dependency('glib-2.0'),
|
|
@@ -58,7 +63,7 @@ cc_sources = files(
|
|
|
58
63
|
# resolves from the typelib. That closes the same hygiene contract the
|
|
59
64
|
# version-script/exported-symbols-list enforce elsewhere. The Windows build
|
|
60
65
|
# still requires a from-source gjs + mozjs-140 toolchain (clang-cl/MSVC; see
|
|
61
|
-
# status/open-todos.md "N-API host in GJS" cross-platform prebuilds + the `windows` job in
|
|
66
|
+
# status/open-todos/README.md "N-API host in GJS" cross-platform prebuilds + the `windows` job in
|
|
62
67
|
# napi.yml) — mozjs-140 is now obtainable (servo/mozjs prebuilt
|
|
63
68
|
# libmozjs-x86_64-pc-windows-msvc), the open wall is gjs-on-Windows itself.
|
|
64
69
|
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.54.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",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"build:prebuilds": "gjsify run build:meson && node ../../../scripts/stage-prebuild.mjs .",
|
|
57
57
|
"build:test-addons": "for d in test/*-addon; do (cd \"$d\" && npm exec -- node-gyp rebuild) || exit 1; done",
|
|
58
58
|
"build:stubs": "python3 scripts/gen-stubs.py",
|
|
59
|
-
"test:gate": "
|
|
60
|
-
"test:gate:p01": "
|
|
61
|
-
"test:gate:p02": "
|
|
59
|
+
"test:gate": "node test/gjs-gate.mjs test/load-gate.js test/hello-addon/build/Release/hello.node",
|
|
60
|
+
"test:gate:p01": "node test/gjs-gate.mjs test/p01-gate.js",
|
|
61
|
+
"test:gate:p02": "node test/gjs-gate.mjs test/p02-gate.js",
|
|
62
62
|
"test:gate:p03": "sh test/run-p03-gate.sh",
|
|
63
|
-
"test:gate:p1": "
|
|
63
|
+
"test:gate:p1": "node test/gjs-gate.mjs test/p1-tsfn-gate.js",
|
|
64
64
|
"test:gate:tsfn-teardown": "node test/tsfn-teardown-gate.mjs",
|
|
65
65
|
"test:nodegi": "node test/nodegi-gate.mjs",
|
|
66
66
|
"test:nodegi:mem": "node test/nodegi-gate.mjs --valgrind",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
},
|
|
98
98
|
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/napi/napi#readme",
|
|
99
99
|
"optionalDependencies": {
|
|
100
|
-
"@gjsify/napi-darwin-arm64": "0.
|
|
101
|
-
"@gjsify/napi-linux-x64": "0.
|
|
100
|
+
"@gjsify/napi-darwin-arm64": "0.54.0",
|
|
101
|
+
"@gjsify/napi-linux-x64": "0.54.0"
|
|
102
102
|
}
|
|
103
103
|
}
|
package/src/cc/module.cc
CHANGED
|
@@ -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 status/open-todos.md)");
|
|
272
|
+
"relies on the delay-load host model — see status/open-todos/README.md)");
|
|
273
273
|
return true;
|
|
274
274
|
#else
|
|
275
275
|
void* ours = reinterpret_cast<void*>(&napi_create_reference);
|