@qvac/ggml-rpc-server 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0] - 2026-10-14
4
+
5
+ ### Breaking
6
+
7
+ - An explicit `backendsDir` is scanned as given. It is no longer a prebuilds
8
+ root with `<host>/qvac__fabric` appended. Omit it and `@qvac/fabric` locates
9
+ the backends it ships, next to its runtime.
10
+
11
+ ### Changed
12
+
13
+ - `@qvac/fabric` dependency bumped `^0.20.0` -> `^0.21.1`, whose platform
14
+ packages are now ordinary addons. This package declares them itself: the
15
+ desktop ones as `optionalDependencies`, and `@qvac/fabric-android-arm64` and
16
+ `@qvac/fabric-ios` as optional `peerDependencies`.
17
+ - Mobile apps must move `@qvac/fabric` and `@qvac/fabric-android-arm64` or
18
+ `@qvac/fabric-ios` to `0.21.1` together.
19
+
3
20
  ## [0.2.0] - 2026-10-06
4
21
 
5
22
  ### Changed
package/binding.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Pre-load @qvac/fabric so its shared .bare module (the llama.cpp + ggml
2
2
  // runtime) is registered with the bare runtime before our addon resolves its
3
- // DT_NEEDED dependency qvac__fabric@0.bare.
3
+ // DT_NEEDED dependency qvac__fabric-<host>@0.bare (shipped by @qvac/fabric-<host>).
4
4
  require("@qvac/fabric");
5
5
 
6
6
  module.exports = require.addon();
package/index.js CHANGED
@@ -16,8 +16,6 @@ exports.allocateFreePort = allocateFreePort;
16
16
  exports.startRpcServer = startRpcServer;
17
17
  /* eslint-disable @typescript-eslint/no-require-imports -- Bare modules and native bindings expose CommonJS export shapes. */
18
18
  const net = require("bare-net");
19
- const path = require("bare-path");
20
- const fabricBackends = require("@qvac/fabric/backends");
21
19
  const binding = require("./binding");
22
20
  /* eslint-enable @typescript-eslint/no-require-imports */
23
21
  exports.DEFAULT_RPC_SERVER_HOST = "127.0.0.1";
@@ -27,7 +25,7 @@ const TRUSTED_LAN_WARNING_CODE = "QVAC_GGML_RPC_SERVER_TRUSTED_LAN";
27
25
  const activeServerHandles = new Set();
28
26
  // Fabric never unloads its RPC module, so its RDMA build cannot change within a
29
27
  // process. Cache the native check, which reads the module from disk.
30
- const rdmaSupportByBackendsDir = new Map();
28
+ let rdmaSupport;
31
29
  class RpcServerPortAllocationError extends Error {
32
30
  constructor(cause) {
33
31
  super("Failed to allocate a free port for ggml-rpc-server", { cause });
@@ -194,17 +192,16 @@ function validateThreads(threads) {
194
192
  throw new TypeError("threads must be a positive integer");
195
193
  }
196
194
  }
197
- function rpcBackendSupportsRdma(backendsDir) {
198
- let supported = rdmaSupportByBackendsDir.get(backendsDir);
199
- if (supported === undefined) {
195
+ // The RPC module @qvac/fabric loads, from wherever fabric ships its backends.
196
+ function rpcBackendSupportsRdma() {
197
+ if (rdmaSupport === undefined) {
200
198
  try {
201
- supported = binding.rpcBackendSupportsRdma({ backendsDir });
199
+ rdmaSupport = binding.rpcBackendSupportsRdma({});
202
200
  } catch (error) {
203
201
  throw toTypedError(error);
204
202
  }
205
- rdmaSupportByBackendsDir.set(backendsDir, supported);
206
203
  }
207
- return supported;
204
+ return rdmaSupport;
208
205
  }
209
206
  function allocateFreePort(
210
207
  host = exports.DEFAULT_RPC_SERVER_HOST,
@@ -234,11 +231,7 @@ async function startRpcServer(options = {}) {
234
231
  assertLoopbackHost(host, options.allowNonLoopbackHost);
235
232
  warnForTrustedLanHost(host, options.allowNonLoopbackHost);
236
233
  validateThreads(options.threads);
237
- // Packed mobile bundles do not retain a resolvable node_modules tree. Their
238
- // packagers stage Fabric's backends beside this addon instead.
239
- const backendsDir =
240
- fabricBackends.resolveBackendsDir() ?? path.join(__dirname, "prebuilds");
241
- const rdmaCapable = rpcBackendSupportsRdma(backendsDir);
234
+ const rdmaCapable = rpcBackendSupportsRdma();
242
235
  if (options.expectRdma === true && !rdmaCapable) {
243
236
  throw new RpcServerRdmaUnavailableError();
244
237
  }
@@ -255,7 +248,6 @@ async function startRpcServer(options = {}) {
255
248
  device,
256
249
  cache: options.cache ?? false,
257
250
  threads: options.threads,
258
- backendsDir,
259
251
  }),
260
252
  );
261
253
  activeServerHandles.add(handle);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/ggml-rpc-server",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Managed ggml RPC server for QVAC LLM inference",
5
5
  "addon": true,
6
6
  "scripts": {
@@ -45,11 +45,11 @@
45
45
  "bugs": "https://github.com/tetherto/qvac/issues",
46
46
  "homepage": "https://github.com/tetherto/qvac/tree/main/packages/ggml-rpc-server#readme",
47
47
  "devDependencies": {
48
- "@qvac/fabric-android-arm64": "0.20.0",
49
- "@qvac/fabric-ios": "0.20.0",
48
+ "@qvac/fabric-android-arm64": "0.21.1",
49
+ "@qvac/fabric-ios": "0.21.1",
50
50
  "@types/node": "^24.2.1",
51
51
  "brittle": "^3.17.0",
52
- "cmake-bare": "^1.7.5",
52
+ "cmake-bare": "^1.9.0",
53
53
  "cmake-npm": "^1.1.0",
54
54
  "cmake-vcpkg": "^1.1.0",
55
55
  "eslint": "^9.39.4",
@@ -62,10 +62,29 @@
62
62
  "typescript-eslint": "^8.63.0"
63
63
  },
64
64
  "dependencies": {
65
- "@qvac/fabric": "^0.20.0",
65
+ "@qvac/fabric": "^0.21.1",
66
66
  "bare-net": "^2.3.2",
67
67
  "bare-path": "^3.0.0"
68
68
  },
69
+ "optionalDependencies": {
70
+ "@qvac/fabric-linux-x64": "^0.21.1",
71
+ "@qvac/fabric-linux-arm64": "^0.21.1",
72
+ "@qvac/fabric-darwin-arm64": "^0.21.1",
73
+ "@qvac/fabric-darwin-x64": "^0.21.1",
74
+ "@qvac/fabric-win32-x64": "^0.21.1"
75
+ },
76
+ "peerDependencies": {
77
+ "@qvac/fabric-android-arm64": "^0.21.1",
78
+ "@qvac/fabric-ios": "^0.21.1"
79
+ },
80
+ "peerDependenciesMeta": {
81
+ "@qvac/fabric-android-arm64": {
82
+ "optional": true
83
+ },
84
+ "@qvac/fabric-ios": {
85
+ "optional": true
86
+ }
87
+ },
69
88
  "engines": {
70
89
  "bare": ">=1.24.0"
71
90
  },
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.2"
10
+ "version": "0.3"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.2"
10
+ "version": "0.3"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.2"
10
+ "version": "0.3"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -43,7 +43,7 @@
43
43
  ],
44
44
  "target_info": [
45
45
  {
46
- "min_deployment": "14",
46
+ "min_deployment": "15",
47
47
  "target": "arm64-ios"
48
48
  }
49
49
  ]
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.2"
10
+ "version": "0.3"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -43,7 +43,7 @@
43
43
  ],
44
44
  "target_info": [
45
45
  {
46
- "min_deployment": "14",
46
+ "min_deployment": "15",
47
47
  "target": "arm64-ios-simulator"
48
48
  }
49
49
  ]
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.2"
10
+ "version": "0.3"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -43,7 +43,7 @@
43
43
  ],
44
44
  "target_info": [
45
45
  {
46
- "min_deployment": "14",
46
+ "min_deployment": "15",
47
47
  "target": "x86_64-ios-simulator"
48
48
  }
49
49
  ]