@diaryx/wasm-node 1.4.4 → 1.4.5-dev.59aae45

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
@@ -20,6 +20,23 @@ To build the WebAssembly module:
20
20
  wasm-pack build --target web --out-dir ../../apps/web/src/lib/wasm
21
21
  ```
22
22
 
23
+ Or via xtask (recommended, runs `wasm-opt -Oz` afterwards):
24
+
25
+ ```bash
26
+ cargo xtask build-wasm # production (smallest binary)
27
+ cargo xtask build-wasm --panic-hook # dev (enables console_error_panic_hook)
28
+ ```
29
+
30
+ ### Cargo features
31
+
32
+ - `browser` (default) — enable OPFS, IndexedDB, and File System Access
33
+ Storage backends plus the `web-sys` APIs they need.
34
+ - `panic-hook` (off by default) — install `console_error_panic_hook` so
35
+ Rust panics render readable stack traces in the browser devtools. Adds a
36
+ small amount of WASM code, so it's opt-in and only recommended for
37
+ debug/dev builds. Pass `--features panic-hook` to `wasm-pack` or
38
+ `--panic-hook` to `cargo xtask build-wasm`.
39
+
23
40
  ## Testing
24
41
 
25
42
  Run browser filesystem integration tests (wasm + browser):
package/diaryx_wasm.d.ts CHANGED
@@ -362,8 +362,8 @@ export interface InitOutput {
362
362
  readonly today_formatted: (a: number, b: number) => [number, number];
363
363
  readonly init: () => void;
364
364
  readonly diaryxbackend_isCrdtEnabled: (a: number) => number;
365
- readonly wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3: (a: number, b: number, c: any) => [number, number];
366
- readonly wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0: (a: number, b: number, c: any, d: any) => void;
365
+ readonly wasm_bindgen__convert__closures_____invoke__h7174ba9de949bff3: (a: number, b: number, c: any) => [number, number];
366
+ readonly wasm_bindgen__convert__closures_____invoke__h377ea917efd328e8: (a: number, b: number, c: any, d: any) => void;
367
367
  readonly __wbindgen_malloc: (a: number, b: number) => number;
368
368
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
369
369
  readonly __wbindgen_exn_store: (a: number) => void;
package/diaryx_wasm.js CHANGED
@@ -695,7 +695,7 @@ function __wbg_get_imports() {
695
695
  const a = state0.a;
696
696
  state0.a = 0;
697
697
  try {
698
- return wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0(a, state0.b, arg0, arg1);
698
+ return wasm_bindgen__convert__closures_____invoke__h377ea917efd328e8(a, state0.b, arg0, arg1);
699
699
  } finally {
700
700
  state0.a = a;
701
701
  }
@@ -771,8 +771,8 @@ function __wbg_get_imports() {
771
771
  console.warn(arg0, arg1, arg2, arg3);
772
772
  },
773
773
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
774
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 596, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
775
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3);
774
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 613, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
775
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h7174ba9de949bff3);
776
776
  return ret;
777
777
  },
778
778
  __wbindgen_cast_0000000000000002: function(arg0) {
@@ -801,15 +801,15 @@ function __wbg_get_imports() {
801
801
  };
802
802
  }
803
803
 
804
- function wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3(arg0, arg1, arg2) {
805
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3(arg0, arg1, arg2);
804
+ function wasm_bindgen__convert__closures_____invoke__h7174ba9de949bff3(arg0, arg1, arg2) {
805
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h7174ba9de949bff3(arg0, arg1, arg2);
806
806
  if (ret[1]) {
807
807
  throw takeFromExternrefTable0(ret[0]);
808
808
  }
809
809
  }
810
810
 
811
- function wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0(arg0, arg1, arg2, arg3) {
812
- wasm.wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0(arg0, arg1, arg2, arg3);
811
+ function wasm_bindgen__convert__closures_____invoke__h377ea917efd328e8(arg0, arg1, arg2, arg3) {
812
+ wasm.wasm_bindgen__convert__closures_____invoke__h377ea917efd328e8(arg0, arg1, arg2, arg3);
813
813
  }
814
814
 
815
815
  const AuthClientFinalization = (typeof FinalizationRegistry === 'undefined')
Binary file
@@ -39,8 +39,8 @@ export const now_timestamp: () => [number, number];
39
39
  export const today_formatted: (a: number, b: number) => [number, number];
40
40
  export const init: () => void;
41
41
  export const diaryxbackend_isCrdtEnabled: (a: number) => number;
42
- export const wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3: (a: number, b: number, c: any) => [number, number];
43
- export const wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0: (a: number, b: number, c: any, d: any) => void;
42
+ export const wasm_bindgen__convert__closures_____invoke__h7174ba9de949bff3: (a: number, b: number, c: any) => [number, number];
43
+ export const wasm_bindgen__convert__closures_____invoke__h377ea917efd328e8: (a: number, b: number, c: any, d: any) => void;
44
44
  export const __wbindgen_malloc: (a: number, b: number) => number;
45
45
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
46
46
  export const __wbindgen_exn_store: (a: number) => void;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@diaryx/wasm-node",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for Diaryx core functionality",
5
- "version": "1.4.4",
5
+ "version": "1.4.5-dev.59aae45",
6
6
  "license": "SEE LICENSE IN ../../LICENSE.md",
7
7
  "repository": {
8
8
  "type": "git",