@gjsify/sab-native 0.64.4 → 0.64.6
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 +18 -7
- package/package.json +13 -13
package/meson.build
CHANGED
|
@@ -8,6 +8,8 @@ project('GjsifySabNative', ['c', 'vala'], version: '1.0',
|
|
|
8
8
|
|
|
9
9
|
root_dir = meson.current_source_dir()
|
|
10
10
|
|
|
11
|
+
host_system = host_machine.system()
|
|
12
|
+
|
|
11
13
|
# Required system packages (Fedora 43+):
|
|
12
14
|
# dnf install vala meson ninja-build
|
|
13
15
|
#
|
|
@@ -24,11 +26,21 @@ root_dir = meson.current_source_dir()
|
|
|
24
26
|
# and call into it from Vala via [CCode] extern declarations. Buffer ownership
|
|
25
27
|
# stays C-side, mirroring the @gjsify/http2-native nghttp2-helpers pattern.
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
]
|
|
29
|
+
# On darwin every GNOME library is resolved against the HOST PROCESS rather than
|
|
30
|
+
# recorded as an `@rpath/` dependency: a second GLib beside the one the host
|
|
31
|
+
# already loaded gives the process two GType registries, then SIGSEGV.
|
|
32
|
+
# docs/prebuilds.md § One GLib.
|
|
33
|
+
host_provided = ['glib-2.0', 'gobject-2.0', 'gio-2.0']
|
|
34
|
+
|
|
35
|
+
vala_deps = []
|
|
36
|
+
foreach pkg : host_provided
|
|
37
|
+
dep = dependency(pkg)
|
|
38
|
+
vala_deps += host_system == 'darwin' \
|
|
39
|
+
? dep.partial_dependency(compile_args: true, includes: true) \
|
|
40
|
+
: dep
|
|
41
|
+
endforeach
|
|
42
|
+
|
|
43
|
+
host_provided_link_args = host_system == 'darwin' ? ['-Wl,-undefined,dynamic_lookup'] : []
|
|
32
44
|
|
|
33
45
|
sources = files(
|
|
34
46
|
'src/vala/sab-helpers.c',
|
|
@@ -39,8 +51,6 @@ sources = files(
|
|
|
39
51
|
# Compiler picks up sab-helpers.h via the include dir.
|
|
40
52
|
inc = include_directories('src/vala')
|
|
41
53
|
|
|
42
|
-
host_system = host_machine.system()
|
|
43
|
-
|
|
44
54
|
# -D_GNU_SOURCE: needed for memfd_create + MFD_CLOEXEC + SYS_futex visibility.
|
|
45
55
|
# darwin exposes everything its backend uses by default.
|
|
46
56
|
c_args = host_system == 'darwin' ? [] : ['-D_GNU_SOURCE']
|
|
@@ -57,6 +67,7 @@ libGjsifySabNative = library('gjsifysabnative', sources,
|
|
|
57
67
|
dependencies: vala_deps,
|
|
58
68
|
include_directories: inc,
|
|
59
69
|
c_args: c_args,
|
|
70
|
+
link_args: host_provided_link_args,
|
|
60
71
|
vala_gir: meson.project_name() + '-1.0.gir',
|
|
61
72
|
install: true,
|
|
62
73
|
install_dir: [true, true, true, true],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/sab-native",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.6",
|
|
4
4
|
"description": "Optional Vala/GObject bridge providing cross-process shared memory + atomics for @gjsify/worker_threads. Wraps Linux memfd_create(2) + mmap(MAP_SHARED) to back JS-visible SharedBuffer regions whose fds can be passed to child workers via SCM_RIGHTS over a Unix-domain socket; exposes typed accessors (getInt32LE / setUint8 / etc.) plus atomics built on __atomic_* GCC builtins and SYS_futex for wait/notify. Workaround for the stock-GJS gap where SharedArrayBuffer is unavailable (Mozilla disables the SAB constructor without COOP/COEP opts) and SAB cannot share backing stores across Gio.Subprocess workers anyway.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/esm/index.js",
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
"@girs/glib-2.0": "5.4.0",
|
|
71
71
|
"@girs/gobject-2.0": "5.4.0",
|
|
72
72
|
"@girs/gio-2.0": "5.4.0",
|
|
73
|
-
"@gjsify/utils": "^0.64.
|
|
73
|
+
"@gjsify/utils": "^0.64.6"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@gjsify/cli": "^0.64.
|
|
77
|
-
"@gjsify/unit": "^0.64.
|
|
76
|
+
"@gjsify/cli": "^0.64.6",
|
|
77
|
+
"@gjsify/unit": "^0.64.6",
|
|
78
78
|
"@ts-for-gir/cli": "^4.1.0",
|
|
79
79
|
"@types/node": "^25.9.2",
|
|
80
80
|
"typescript": "^6.0.3"
|
|
@@ -90,14 +90,14 @@
|
|
|
90
90
|
},
|
|
91
91
|
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/node/sab-native#readme",
|
|
92
92
|
"optionalDependencies": {
|
|
93
|
-
"@gjsify/sab-native-darwin-arm64": "0.64.
|
|
94
|
-
"@gjsify/sab-native-darwin-x64": "0.64.
|
|
95
|
-
"@gjsify/sab-native-linux-arm64": "0.64.
|
|
96
|
-
"@gjsify/sab-native-linux-arm64-musl": "0.64.
|
|
97
|
-
"@gjsify/sab-native-linux-ppc64": "0.64.
|
|
98
|
-
"@gjsify/sab-native-linux-riscv64": "0.64.
|
|
99
|
-
"@gjsify/sab-native-linux-s390x": "0.64.
|
|
100
|
-
"@gjsify/sab-native-linux-x64": "0.64.
|
|
101
|
-
"@gjsify/sab-native-linux-x64-musl": "0.64.
|
|
93
|
+
"@gjsify/sab-native-darwin-arm64": "0.64.6",
|
|
94
|
+
"@gjsify/sab-native-darwin-x64": "0.64.6",
|
|
95
|
+
"@gjsify/sab-native-linux-arm64": "0.64.6",
|
|
96
|
+
"@gjsify/sab-native-linux-arm64-musl": "0.64.6",
|
|
97
|
+
"@gjsify/sab-native-linux-ppc64": "0.64.6",
|
|
98
|
+
"@gjsify/sab-native-linux-riscv64": "0.64.6",
|
|
99
|
+
"@gjsify/sab-native-linux-s390x": "0.64.6",
|
|
100
|
+
"@gjsify/sab-native-linux-x64": "0.64.6",
|
|
101
|
+
"@gjsify/sab-native-linux-x64-musl": "0.64.6"
|
|
102
102
|
}
|
|
103
103
|
}
|