libfw-client 0.4.6 → 0.4.8

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 CHANGED
@@ -78,7 +78,7 @@ directory picker, so they must run from a user gesture (a click handler).
78
78
  | `concurrency` | `4` | max files transferred in parallel |
79
79
  | `uploadWindow` | `8` | in-flight chunks per single-file upload |
80
80
  | `downloadWindow` | `4` | in-flight `Range` GETs per single-file download (`1` = sequential) |
81
- | `compress` | `true` | request/send zrip (zstd) compression |
81
+ | `compress` | `true` | request/send zrip (zstd) compression — costs CPU per byte; on a link faster than the compressor (LAN, ≥30 MiB/s) `false` is several times faster, and uploads then take a zero-copy `Blob` path |
82
82
  | `compressLevel` | `'balanced'` | `'auto'` \| `'fast'` \| `'balanced'` \| `'max'` \| number; `'auto'` benchmarks uploads |
83
83
  | `chunkSize` | `2097152` (2 MiB) | shared chunk size for uploads and download ranges |
84
84
  | `maxRetries` | `3` | retries per chunk/file |
@@ -101,9 +101,14 @@ Notes:
101
101
  in-flight request budget as `concurrency × max(uploadWindow,
102
102
  downloadWindow)`, so raising a window actually increases parallelism (it
103
103
  used to be capped by `concurrency` alone).
104
- - `chunkSize` is used by both directions. The download path buffers in-flight
105
- chunks for reordering, so peak memory is roughly
106
- `downloadWindow × chunkSize`.
104
+ - `chunkSize` is used by both directions and is the unit of per-request
105
+ overhead — a bigger chunk means fewer requests, which on a fast link beats
106
+ more parallelism. It is also the starting point of an `autoTune` ramp (the
107
+ tuner tracks the measured link from there, inside the advertised range).
108
+ The download path buffers in-flight chunks for reordering, so peak memory is
109
+ roughly `downloadWindow × chunkSize`; when `concurrency × window × chunkSize`
110
+ exceeds the engine budget the in-flight window shrinks first (down to two
111
+ requests per file), not the chunk.
107
112
  - `compressLevel` is a client *policy*, resolved against the server's
108
113
  advertised range. `'auto'` additionally micro-benchmarks the range on a
109
114
  real sample of the first uploaded file; downloads request the resolved
@@ -213,11 +218,13 @@ try {
213
218
  disk in order. Each range retries independently; `Range`/`If-Range`/`416`
214
219
  give resume against the server ETag. Files at or below 512 KiB stay on the
215
220
  sequential path.
216
- - **Uploads** — slice each file, compress each chunk into zrip frames, probe
217
- the server's received ranges (`x-libfw-session-status`), POST only the
218
- missing chunks with their absolute offset (out of order), then commit with
219
- `x-libfw-final: 1`. A commit that fails re-probes and refills rather than
220
- failing the task.
221
+ - **Uploads** — slice each file, probe the server's received ranges
222
+ (`x-libfw-session-status`), POST only the missing chunks with their absolute
223
+ offset (out of order), then commit with `x-libfw-final: 1`. Chunks are
224
+ compressed into zrip frames when `compress` is on; when it is off the engine
225
+ hands the browser a `Blob` of the chunk instead, so the bytes are streamed
226
+ straight from the file and never enter JS or WASM memory. A commit that fails
227
+ re-probes and refills rather than failing the task.
221
228
  - **State machine** — `idle → downloading/uploading → paused → resumed →
222
229
  completed/failed`. `pause()` stops scheduling new work; in-flight requests
223
230
  are allowed to finish.
@@ -262,9 +269,12 @@ are sanitized; `..` and drive-like segments are rejected.
262
269
  With `autoTune: true` the engine fetches `/capabilities`, starts at the
263
270
  advertised minimums and ramps the per-file window, then cross-file
264
271
  concurrency, from 1-second EWMA measurements. The chunk size follows the
265
- measured throughput (~100 ms of data, clamped into the advertised range); the
266
- zrip level is a policy, never ramped. Errors halve the parameters and require
267
- two stable windows before settling.
272
+ measured throughput (~400 ms of data, clamped into the advertised range), and a
273
+ fresh ramp starts from the configured `chunkSize` rather than the advertised
274
+ minimum: a chunk is the unit of per-request overhead, so starting small means
275
+ thousands of round trips for bytes the link could have carried in a few big
276
+ requests. The zrip level is a policy, never ramped. Errors halve the parameters
277
+ and require two stable windows before settling.
268
278
 
269
279
  A settle is reused by later transfers in the same client **and** cached in
270
280
  `localStorage`:
package/index.d.ts CHANGED
@@ -125,7 +125,17 @@ export interface LibfwClientOptions {
125
125
  * parallelism (sequential downloads). Default `4`.
126
126
  */
127
127
  downloadWindow?: number;
128
- /** Negotiate zrip compression. Default `true`. */
128
+ /**
129
+ * Negotiate zrip compression. Default `true`.
130
+ *
131
+ * Compression runs in WASM, so it costs CPU per byte: on a fast link
132
+ * (LAN/loopback, or anything above roughly 30 MiB/s) turning it off is
133
+ * several times faster end to end — the same 32 MiB file uploaded at
134
+ * ~19 MiB/s compressed and ~125 MiB/s uncompressed in Chromium. It pays for
135
+ * itself only when the link is slower than the compressor (WAN, mobile).
136
+ * With `false`, uploads also take the zero-copy path: the engine hands the
137
+ * browser a `Blob` of the chunk and never touches the bytes itself.
138
+ */
129
139
  compress?: boolean;
130
140
  /**
131
141
  * zrip level policy when `compress` is on. `'fast'` = advertised minimum
@@ -139,7 +149,19 @@ export interface LibfwClientOptions {
139
149
  * Downloads request the resolved level from the server.
140
150
  */
141
151
  compressLevel?: number | 'auto' | 'fast' | 'balanced' | 'max';
142
- /** Shared chunk size in bytes for uploads and parallel downloads. Default 2 MiB. */
152
+ /**
153
+ * Shared chunk size in bytes for uploads and parallel downloads. Default
154
+ * 2 MiB.
155
+ *
156
+ * This is the unit of per-request overhead: raising it is what reduces the
157
+ * request count, so on a fast link (or behind a proxy that charges a round
158
+ * trip per request) a larger value is materially faster than many small
159
+ * ones. It is also the starting point of an `autoTune` ramp — the tuner then
160
+ * tracks the measured link from there, inside the server's advertised range
161
+ * (up to 32 MiB by default). Peak memory per transfer is
162
+ * `concurrency × window × chunkSize`, bounded by the engine; when the product
163
+ * does not fit, the in-flight window shrinks, not the chunk.
164
+ */
143
165
  chunkSize?: number;
144
166
  /** Retries per chunk/file before failing. Default `3`. */
145
167
  maxRetries?: number;
@@ -174,10 +196,12 @@ export interface LibfwClientOptions {
174
196
  * Enable the adaptive tuning engine: the engine probes the server's
175
197
  * `/capabilities` limits and TCP-style ramps the per-file window and
176
198
  * cross-file concurrency from the advertised minimums using real transfer
177
- * stats. The chunk size follows the measured throughput (~100 ms of it,
178
- * clamped into the advertised range) and the zrip level is a client policy
179
- * from `compressLevel`, never ramped. When disabled the configured static
180
- * values are used as-is. Default `false`.
199
+ * stats. The chunk size follows the measured throughput (~400 ms of it,
200
+ * clamped into the advertised range), starting from the configured
201
+ * `chunkSize` — a chunk is the unit of per-request overhead, so a small
202
+ * start costs thousands of round trips for the same bytes. The zrip level
203
+ * is a client policy from `compressLevel`, never ramped. When disabled the
204
+ * configured static values are used as-is. Default `false`.
181
205
  *
182
206
  * Tuning state lives in memory for this client instance (a settle is reused
183
207
  * by later transfers and dropped on failure) **and** is cached in
package/index.js CHANGED
@@ -224,7 +224,11 @@ export class LibfwClient {
224
224
  * @param {number} [options.chunkSize=2097152] shared chunk size in bytes for
225
225
  * both upload chunks and parallel download ranges. The same value is
226
226
  * used on both paths, and any value works as long as the server and
227
- * memory budget permit it (larger = fewer, bigger requests).
227
+ * memory budget permit it (larger = fewer, bigger requests — the
228
+ * per-request overhead is what makes a small chunk slow on a fast
229
+ * link, so raise this on a LAN/fast link or behind a proxy that
230
+ * charges a round trip per request). It is also the starting point of
231
+ * an `autoTune` ramp.
228
232
  * @param {number} [options.maxRetries=3] retries per chunk/file before failing
229
233
  * @param {number} [options.baseRetryDelayMs=500] initial backoff (ms)
230
234
  * @param {number} [options.maxRetryDelayMs=30000] backoff ceiling (ms)
@@ -247,8 +251,9 @@ export class LibfwClient {
247
251
  * engine: the engine probes the server's `/capabilities` limits and
248
252
  * TCP-style ramps the per-file window and cross-file concurrency from
249
253
  * the advertised minimums using real transfer stats; the chunk size
250
- * follows the measured throughput (~100 ms of it, clamped into the
251
- * advertised range) and the zrip level is a client policy from
254
+ * follows the measured throughput (~400 ms of it, clamped into the
255
+ * advertised range) starting from the configured `chunkSize`, and the
256
+ * zrip level is a client policy from
252
257
  * `compressLevel`, never ramped. When disabled the configured static
253
258
  * values are used as-is. A settled result is kept in memory for this
254
259
  * client instance (reused by later transfers, dropped on failure)
@@ -456,6 +461,7 @@ export class LibfwClient {
456
461
  },
457
462
  getFileList: () => this._getFileList(),
458
463
  readFile: (path, offset, length) => this._readFile(path, offset, length),
464
+ readFileBlob: (path, offset, length) => this._readFileBlob(path, offset, length),
459
465
  log: (msg) => {
460
466
  if (typeof console !== 'undefined') console.debug(`[libfw] ${msg}`);
461
467
  },
@@ -1322,6 +1328,28 @@ export class LibfwClient {
1322
1328
  return new Uint8Array(buffer);
1323
1329
  }
1324
1330
 
1331
+ /**
1332
+ * Engine callback: a `Blob` view of `length` bytes of an upload file.
1333
+ *
1334
+ * Used by the pass-through path (`compress: false`): the engine hands this
1335
+ * `Blob` straight to `XMLHttpRequest`, so the browser streams the range out
1336
+ * of the file and no byte is read into JS or copied into WASM. Keeps the
1337
+ * promise shape of {@link LibfwClient#_readFile} because the engine awaits
1338
+ * every file callback.
1339
+ * @param {string} path
1340
+ * @param {number} offset
1341
+ * @param {number} length
1342
+ * @returns {Promise<Blob>}
1343
+ * @private
1344
+ */
1345
+ async _readFileBlob(path, offset, length) {
1346
+ const file = this._uploadFiles.get(path);
1347
+ if (!file) {
1348
+ throw new LibfwError(`upload source not found: ${path}`, 'storage');
1349
+ }
1350
+ return file.slice(offset, offset + length);
1351
+ }
1352
+
1325
1353
  // ------------------------------------------------------------- controls
1326
1354
 
1327
1355
  /** Pause the active transfer (state → `paused`). */
package/package.json CHANGED
@@ -1,8 +1,16 @@
1
1
  {
2
2
  "name": "libfw-client",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "libfw client for browsers, providing high performance file transfer capabilities using WebAssembly.",
5
5
  "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/ArthurZhou/libfw.git"
9
+ },
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "registry": "https://registry.npmjs.org/"
13
+ },
6
14
  "type": "module",
7
15
  "main": "index.js",
8
16
  "module": "index.js",
@@ -27,7 +35,8 @@
27
35
  ],
28
36
  "sideEffects": false,
29
37
  "scripts": {
30
- "build:wasm": "wasm-pack build ../crates/libfw-client --target web --out-dir ../../sdk/pkg --release",
38
+ "prepublishOnly": "node scripts/verify-pkg.cjs",
39
+ "build:wasm": "wasm-pack build ../crates/libfw-client --target web --out-dir ../../sdk/pkg --release && rm -f pkg/.gitignore",
31
40
  "build:umd": "rollup -c rollup.config.mjs",
32
41
  "build": "npm run build:wasm && npm run build:umd"
33
42
  },
@@ -103,11 +103,11 @@ export interface InitOutput {
103
103
  readonly libfwclient_tune_state: (a: number) => any;
104
104
  readonly libfwclient_upload: (a: number, b: number, c: number, d: number, e: number) => any;
105
105
  readonly start: () => void;
106
- readonly wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_fcaa1ccc421e504f___JsError___true_: (a: number, b: number, c: any) => [number, number];
107
- readonly wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
108
- readonly wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true_: (a: number, b: number, c: any) => void;
109
- readonly wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true__2: (a: number, b: number, c: any) => void;
110
- readonly wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke_______true_: (a: number, b: number) => void;
106
+ readonly wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_61f1d8f55010c370___JsError___true_: (a: number, b: number, c: any) => [number, number];
107
+ readonly wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
108
+ readonly wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true_: (a: number, b: number, c: any) => void;
109
+ readonly wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true__2: (a: number, b: number, c: any) => void;
110
+ readonly wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke_______true_: (a: number, b: number) => void;
111
111
  readonly __wbindgen_malloc: (a: number, b: number) => number;
112
112
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
113
113
  readonly __wbindgen_exn_store: (a: number) => void;
@@ -326,6 +326,10 @@ function __wbg_get_imports() {
326
326
  const ret = arg0[arg1 >>> 0];
327
327
  return ret;
328
328
  },
329
+ __wbg_has_8374cf06984d8bfc: function() { return handleError(function (arg0, arg1) {
330
+ const ret = Reflect.has(arg0, arg1);
331
+ return ret;
332
+ }, arguments); },
329
333
  __wbg_headers_cf9c80f30e2a4eff: function(arg0) {
330
334
  const ret = arg0.headers;
331
335
  return ret;
@@ -340,6 +344,16 @@ function __wbg_get_imports() {
340
344
  const ret = result;
341
345
  return ret;
342
346
  },
347
+ __wbg_instanceof_Blob_c6523f92a32c8695: function(arg0) {
348
+ let result;
349
+ try {
350
+ result = arg0 instanceof Blob;
351
+ } catch (_) {
352
+ result = false;
353
+ }
354
+ const ret = result;
355
+ return ret;
356
+ },
343
357
  __wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
344
358
  let result;
345
359
  try {
@@ -403,7 +417,7 @@ function __wbg_get_imports() {
403
417
  const a = state0.a;
404
418
  state0.a = 0;
405
419
  try {
406
- return wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined_______true_(a, state0.b, arg0, arg1);
420
+ return wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined_______true_(a, state0.b, arg0, arg1);
407
421
  } finally {
408
422
  state0.a = a;
409
423
  }
@@ -437,7 +451,7 @@ function __wbg_get_imports() {
437
451
  const a = state0.a;
438
452
  state0.a = 0;
439
453
  try {
440
- return wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined_______true_(a, state0.b, arg0, arg1);
454
+ return wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined_______true_(a, state0.b, arg0, arg1);
441
455
  } finally {
442
456
  state0.a = a;
443
457
  }
@@ -448,14 +462,26 @@ function __wbg_get_imports() {
448
462
  state0.a = 0;
449
463
  }
450
464
  },
465
+ __wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
466
+ const ret = new Uint8Array(arg0 >>> 0);
467
+ return ret;
468
+ },
451
469
  __wbg_new_with_str_and_init_d95cbe11ce28e65e: function() { return handleError(function (arg0, arg1, arg2) {
452
470
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
453
471
  return ret;
454
472
  }, arguments); },
473
+ __wbg_new_with_u8_array_sequence_bdda73b0f202f149: function() { return handleError(function (arg0) {
474
+ const ret = new Blob(arg0);
475
+ return ret;
476
+ }, arguments); },
455
477
  __wbg_now_86c0d4ba3fa605b8: function() {
456
478
  const ret = Date.now();
457
479
  return ret;
458
480
  },
481
+ __wbg_of_85f52f8b6491a7ca: function(arg0) {
482
+ const ret = Array.of(arg0);
483
+ return ret;
484
+ },
459
485
  __wbg_open_90286a4ce0ae2098: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
460
486
  arg0.open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);
461
487
  }, arguments); },
@@ -488,8 +514,8 @@ function __wbg_get_imports() {
488
514
  const ret = Promise.resolve(arg0);
489
515
  return ret;
490
516
  },
491
- __wbg_send_4a966e8f532ab09b: function() { return handleError(function (arg0, arg1, arg2) {
492
- arg0.send(arg1 === 0 ? undefined : getArrayU8FromWasm0(arg1, arg2));
517
+ __wbg_send_99f08159076e44ba: function() { return handleError(function (arg0, arg1) {
518
+ arg0.send(arg1);
493
519
  }, arguments); },
494
520
  __wbg_setInterval_93ec7461c3650c76: function() { return handleError(function (arg0, arg1, arg2) {
495
521
  const ret = arg0.setInterval(arg1, arg2);
@@ -508,6 +534,9 @@ function __wbg_get_imports() {
508
534
  __wbg_set_0de9c62c23d04ad5: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
509
535
  arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
510
536
  }, arguments); },
537
+ __wbg_set_4d7dd76f3dae2926: function(arg0, arg1, arg2) {
538
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
539
+ },
511
540
  __wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
512
541
  const ret = Reflect.set(arg0, arg1, arg2);
513
542
  return ret;
@@ -540,6 +569,10 @@ function __wbg_get_imports() {
540
569
  const ret = arg0.signal;
541
570
  return ret;
542
571
  },
572
+ __wbg_size_6304a694765921a9: function(arg0) {
573
+ const ret = arg0.size;
574
+ return ret;
575
+ },
543
576
  __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
544
577
  const ret = arg1.stack;
545
578
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -592,23 +625,23 @@ function __wbg_get_imports() {
592
625
  return ret;
593
626
  }, arguments); },
594
627
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
595
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 206, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
596
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_fcaa1ccc421e504f___JsError___true_);
628
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 213, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
629
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_61f1d8f55010c370___JsError___true_);
597
630
  return ret;
598
631
  },
599
632
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
600
633
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 4, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
601
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true_);
634
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true_);
602
635
  return ret;
603
636
  },
604
637
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
605
638
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ProgressEvent")], shim_idx: 4, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
606
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true__2);
639
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true__2);
607
640
  return ret;
608
641
  },
609
642
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
610
643
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 7, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
611
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke_______true_);
644
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke_______true_);
612
645
  return ret;
613
646
  },
614
647
  __wbindgen_cast_0000000000000005: function(arg0) {
@@ -637,27 +670,27 @@ function __wbg_get_imports() {
637
670
  };
638
671
  }
639
672
 
640
- function wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke_______true_(arg0, arg1) {
641
- wasm.wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke_______true_(arg0, arg1);
673
+ function wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke_______true_(arg0, arg1) {
674
+ wasm.wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke_______true_(arg0, arg1);
642
675
  }
643
676
 
644
- function wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true_(arg0, arg1, arg2) {
645
- wasm.wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true_(arg0, arg1, arg2);
677
+ function wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true_(arg0, arg1, arg2) {
678
+ wasm.wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true_(arg0, arg1, arg2);
646
679
  }
647
680
 
648
- function wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true__2(arg0, arg1, arg2) {
649
- wasm.wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true__2(arg0, arg1, arg2);
681
+ function wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true__2(arg0, arg1, arg2) {
682
+ wasm.wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true__2(arg0, arg1, arg2);
650
683
  }
651
684
 
652
- function wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_fcaa1ccc421e504f___JsError___true_(arg0, arg1, arg2) {
653
- const ret = wasm.wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_fcaa1ccc421e504f___JsError___true_(arg0, arg1, arg2);
685
+ function wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_61f1d8f55010c370___JsError___true_(arg0, arg1, arg2) {
686
+ const ret = wasm.wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_61f1d8f55010c370___JsError___true_(arg0, arg1, arg2);
654
687
  if (ret[1]) {
655
688
  throw takeFromExternrefTable0(ret[0]);
656
689
  }
657
690
  }
658
691
 
659
- function wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
660
- wasm.wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
692
+ function wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
693
+ wasm.wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
661
694
  }
662
695
 
663
696
  const LibfwClientFinalization = (typeof FinalizationRegistry === 'undefined')
Binary file
@@ -19,11 +19,11 @@ export const libfwclient_total_bytes: (a: number) => number;
19
19
  export const libfwclient_tune_state: (a: number) => any;
20
20
  export const libfwclient_upload: (a: number, b: number, c: number, d: number, e: number) => any;
21
21
  export const start: () => void;
22
- export const wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_fcaa1ccc421e504f___JsError___true_: (a: number, b: number, c: any) => [number, number];
23
- export const wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined___js_sys_acd39e4161e779fb___Function_fn_wasm_bindgen_fcaa1ccc421e504f___JsValue_____wasm_bindgen_fcaa1ccc421e504f___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
24
- export const wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true_: (a: number, b: number, c: any) => void;
25
- export const wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke___wasm_bindgen_fcaa1ccc421e504f___JsValue______true__2: (a: number, b: number, c: any) => void;
26
- export const wasm_bindgen_fcaa1ccc421e504f___convert__closures_____invoke_______true_: (a: number, b: number) => void;
22
+ export const wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_61f1d8f55010c370___JsError___true_: (a: number, b: number, c: any) => [number, number];
23
+ export const wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined___js_sys_aae1c6745bd75fc1___Function_fn_wasm_bindgen_61f1d8f55010c370___JsValue_____wasm_bindgen_61f1d8f55010c370___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
24
+ export const wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true_: (a: number, b: number, c: any) => void;
25
+ export const wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke___wasm_bindgen_61f1d8f55010c370___JsValue______true__2: (a: number, b: number, c: any) => void;
26
+ export const wasm_bindgen_61f1d8f55010c370___convert__closures_____invoke_______true_: (a: number, b: number) => void;
27
27
  export const __wbindgen_malloc: (a: number, b: number) => number;
28
28
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
29
29
  export const __wbindgen_exn_store: (a: number) => void;
package/pkg/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "libfw-client",
3
3
  "type": "module",
4
4
  "description": "libfw client: native Rust client + WASM engine + JS SDK",
5
- "version": "0.4.6",
5
+ "version": "0.4.8",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",