@gjsify/http2-native 0.22.0 → 0.23.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 +26 -1
- package/meson.build +21 -1
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -31,7 +31,32 @@ if (hasNativeHttp2()) {
|
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
See [Platform coverage](#platform-coverage) for the prebuilt platforms.
|
|
35
|
+
|
|
36
|
+
## Platform coverage
|
|
37
|
+
|
|
38
|
+
| Platform | Prebuild | Built by |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `linux-x86_64` | ✅ `.so` + `.gir` + `.typelib` | native runner |
|
|
41
|
+
| `linux-aarch64` | ✅ | native runner |
|
|
42
|
+
| `linux-ppc64`, `linux-s390x`, `linux-riscv64` | ✅ | QEMU emulation |
|
|
43
|
+
| `darwin-arm64` (macOS, Apple silicon) | ✅ `.dylib` + `.gir` + `.typelib` | `macos-latest` runner |
|
|
44
|
+
| `darwin-x64` (macOS, Intel) | ❌ | — no runner leg yet |
|
|
45
|
+
| Windows | ❌ | — no Vala/GI bridge in this repo targets Windows |
|
|
46
|
+
|
|
47
|
+
All prebuilds are produced by [`.github/workflows/prebuilds.yml`](../../../.github/workflows/prebuilds.yml)
|
|
48
|
+
and committed back to the repository. Build from source with `meson` + `valac` + nghttp2
|
|
49
|
+
development headers if your architecture is not covered.
|
|
50
|
+
|
|
51
|
+
On macOS, nghttp2 comes from Homebrew's keg-only `libnghttp2` formula. Because this bridge
|
|
52
|
+
resolves it through `cc.find_library('nghttp2', …)` rather than pkg-config, the build needs
|
|
53
|
+
`CPPFLAGS`/`LDFLAGS` pointed at `$(brew --prefix libnghttp2)` — the prebuilds workflow does
|
|
54
|
+
this for you.
|
|
55
|
+
|
|
56
|
+
**Known gap — a `darwin-arm64` prebuild is built and shipped, but the CLI does not
|
|
57
|
+
load it yet.** `detectNativePackages()` (`packages/infra/cli/src/utils/detect-native-packages.ts`)
|
|
58
|
+
hardcodes a `linux-` directory prefix, and `buildNativeEnv()` exports `LD_LIBRARY_PATH`,
|
|
59
|
+
which macOS `dyld` ignores in favour of `DYLD_LIBRARY_PATH`.
|
|
35
60
|
|
|
36
61
|
## License
|
|
37
62
|
|
package/meson.build
CHANGED
|
@@ -41,12 +41,32 @@ libGjsifyHttp2 = library('gjsifyhttp2', sources,
|
|
|
41
41
|
install_dir: [true, true, true, true],
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
+
# ----------------------------------------------------------------------------
|
|
45
|
+
# Host-dependent shared-library leaf name.
|
|
46
|
+
#
|
|
47
|
+
# The typelib records the exact filename gjs' g_module_open() resolves at load
|
|
48
|
+
# time, and meson names the shared library per host convention: lib<name>.so on
|
|
49
|
+
# ELF hosts, lib<name>.dylib on macOS. Recording the wrong leaf yields a typelib
|
|
50
|
+
# that IS found via GI_TYPELIB_PATH but whose library never loads — a silent,
|
|
51
|
+
# confusing failure. Mirrors the branch in packages/napi/napi/meson.build.
|
|
52
|
+
#
|
|
53
|
+
# Windows is deliberately absent: this bridge has had no Windows portability
|
|
54
|
+
# work, so `else` (ELF naming) is the honest fallback rather than a .dll branch
|
|
55
|
+
# that would imply support which does not exist.
|
|
56
|
+
# ----------------------------------------------------------------------------
|
|
57
|
+
host_system = host_machine.system()
|
|
58
|
+
if host_system == 'darwin'
|
|
59
|
+
shared_lib_name = 'libgjsifyhttp2.dylib'
|
|
60
|
+
else
|
|
61
|
+
shared_lib_name = 'libgjsifyhttp2.so'
|
|
62
|
+
endif
|
|
63
|
+
|
|
44
64
|
g_ir_compiler = find_program('g-ir-compiler')
|
|
45
65
|
|
|
46
66
|
custom_target(meson.project_name() + '-1.0.typelib',
|
|
47
67
|
command: [
|
|
48
68
|
g_ir_compiler,
|
|
49
|
-
'--shared-library',
|
|
69
|
+
'--shared-library', shared_lib_name,
|
|
50
70
|
'--output', '@OUTPUT@',
|
|
51
71
|
meson.current_build_dir() / meson.project_name() + '-1.0.gir',
|
|
52
72
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/http2-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Optional Vala/GObject bridge providing nghttp2 primitives unreachable through libsoup's high-level GIR API: HPACK header-block encoding (for PUSH_PROMISE / DATA frames), server-side push stream-ID allocation, and a thin nghttp2_session wrapper for future cleartext HTTP/2 (h2c) support. Used by @gjsify/http2 to back ServerHttp2Stream.pushStream() / respondWithFD() / respondWithFile() and enable createServer() over plain TCP once the full Soup ↔ nghttp2 boundary is in place.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/esm/index.js",
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
"src/vala"
|
|
20
20
|
],
|
|
21
21
|
"gjsify": {
|
|
22
|
+
"platforms": [
|
|
23
|
+
"linux-x86_64",
|
|
24
|
+
"linux-aarch64",
|
|
25
|
+
"linux-ppc64",
|
|
26
|
+
"linux-s390x",
|
|
27
|
+
"linux-riscv64",
|
|
28
|
+
"darwin-arm64"
|
|
29
|
+
],
|
|
22
30
|
"prebuilds": "prebuilds",
|
|
23
31
|
"runtimes": {
|
|
24
32
|
"gjs": "polyfill",
|
|
@@ -37,7 +45,7 @@
|
|
|
37
45
|
"build:gjsify": "gjsify build --library 'src/ts/**/*.{ts,js}' --exclude 'src/ts/**/*.spec.{mts,ts}' 'src/ts/test.{mts,ts}'",
|
|
38
46
|
"build:meson": "gjsify run init:meson && meson compile -C build",
|
|
39
47
|
"build:types": "gjsify tsc",
|
|
40
|
-
"build:prebuilds": "gjsify run build:meson &&
|
|
48
|
+
"build:prebuilds": "gjsify run build:meson && node ../../../scripts/stage-prebuild.mjs .",
|
|
41
49
|
"build:gir-types": "ts-for-gir generate --externalDeps --allowMissingDeps --girDirectories=./prebuilds/linux-x86_64 --girDirectories=/usr/share/gir-1.0 --modules=GjsifyHttp2-1.0 --outdir=src/ts --npmScope=@girs --package=false --ignoreVersionConflicts=true",
|
|
42
50
|
"build:test": "gjsify run build:test:gjs",
|
|
43
51
|
"build:test:gjs": "gjsify build src/ts/test.mts --app gjs --outfile test.gjs.mjs",
|
|
@@ -60,8 +68,8 @@
|
|
|
60
68
|
"@girs/gobject-2.0": "^4.1.0"
|
|
61
69
|
},
|
|
62
70
|
"devDependencies": {
|
|
63
|
-
"@gjsify/cli": "^0.
|
|
64
|
-
"@gjsify/unit": "^0.
|
|
71
|
+
"@gjsify/cli": "^0.23.0",
|
|
72
|
+
"@gjsify/unit": "^0.23.0",
|
|
65
73
|
"@ts-for-gir/cli": "^4.1.0",
|
|
66
74
|
"@types/node": "^25.9.2",
|
|
67
75
|
"typescript": "^6.0.3"
|