@diaryx/wasm-node 1.4.0-dev.a57c306 → 1.4.0-dev.dd1af96
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 +12 -0
- package/diaryx_wasm.d.ts +3 -15
- package/diaryx_wasm.js +7 -34
- package/diaryx_wasm_bg.wasm +0 -0
- package/diaryx_wasm_bg.wasm.d.ts +3 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,6 +51,18 @@ Current filesystem test suites live in:
|
|
|
51
51
|
which provides a unified command API (`execute()`/`executeJs()`) backed by native
|
|
52
52
|
browser storage (OPFS, IndexedDB, File System Access API).
|
|
53
53
|
|
|
54
|
+
The crate's `build.rs` is intentionally self-contained and does not link
|
|
55
|
+
`diaryx_core` as a native build-dependency; it only strips frontmatter from the
|
|
56
|
+
crate README before embedding it. That keeps `wasm-pack` host-tool builds
|
|
57
|
+
lighter and avoids pulling the full core crate into the native build-script
|
|
58
|
+
link step.
|
|
59
|
+
|
|
60
|
+
On macOS, the surrounding build should also prefer the Xcode host linker
|
|
61
|
+
(`/usr/bin/cc`) for native build scripts and proc-macro helpers. Mixing Rust's
|
|
62
|
+
host artifacts with a Nix cc-wrapper / Nix-provided libiconv without the
|
|
63
|
+
matching Apple SDK can break even third-party build scripts before wasm
|
|
64
|
+
compilation starts.
|
|
65
|
+
|
|
54
66
|
Sync and publish functionality are provided by Extism guest plugins
|
|
55
67
|
(`diaryx_sync.wasm`, `diaryx_publish.wasm`) loaded at runtime by the browser
|
|
56
68
|
plugin manager. CRDT commands are routed to the sync plugin via the frontend
|
package/diaryx_wasm.d.ts
CHANGED
|
@@ -170,11 +170,6 @@ export class DiaryxBackend {
|
|
|
170
170
|
* This avoids JSON serialization overhead for better performance.
|
|
171
171
|
*/
|
|
172
172
|
executeJs(command: any): Promise<any>;
|
|
173
|
-
/**
|
|
174
|
-
* Get the current configuration from root index frontmatter.
|
|
175
|
-
* Config keys are stored as `diaryx_*` properties.
|
|
176
|
-
*/
|
|
177
|
-
getConfig(): Promise<any>;
|
|
178
173
|
/**
|
|
179
174
|
* Check if this backend has native sync support.
|
|
180
175
|
* Always false — sync is handled by the Extism sync plugin loaded at runtime.
|
|
@@ -226,11 +221,6 @@ export class DiaryxBackend {
|
|
|
226
221
|
* Returns data as Uint8Array for efficient handling without base64 encoding.
|
|
227
222
|
*/
|
|
228
223
|
readBinary(path: string): Promise<any>;
|
|
229
|
-
/**
|
|
230
|
-
* Save configuration to root index frontmatter.
|
|
231
|
-
* Config keys are stored as `diaryx_*` properties.
|
|
232
|
-
*/
|
|
233
|
-
saveConfig(config_js: any): Promise<any>;
|
|
234
224
|
/**
|
|
235
225
|
* No-op — CrdtFs is not used; sync handled by Extism plugin.
|
|
236
226
|
*/
|
|
@@ -305,12 +295,10 @@ export interface InitOutput {
|
|
|
305
295
|
readonly diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
306
296
|
readonly diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
307
297
|
readonly diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
308
|
-
readonly diaryxbackend_getConfig: (a: number) => any;
|
|
309
298
|
readonly diaryxbackend_hasNativeSync: (a: number) => number;
|
|
310
299
|
readonly diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
311
300
|
readonly diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
312
301
|
readonly diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
313
|
-
readonly diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
314
302
|
readonly diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
|
|
315
303
|
readonly diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
316
304
|
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
@@ -319,9 +307,9 @@ export interface InitOutput {
|
|
|
319
307
|
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
320
308
|
readonly init: () => void;
|
|
321
309
|
readonly diaryxbackend_isCrdtEnabled: (a: number) => number;
|
|
322
|
-
readonly
|
|
323
|
-
readonly
|
|
324
|
-
readonly
|
|
310
|
+
readonly wasm_bindgen__closure__destroy__hc0ecfed3f77ea255: (a: number, b: number) => void;
|
|
311
|
+
readonly wasm_bindgen__convert__closures_____invoke__h2b2515b80a4dcf5e: (a: number, b: number, c: any) => [number, number];
|
|
312
|
+
readonly wasm_bindgen__convert__closures_____invoke__h229fb34ceaba2930: (a: number, b: number, c: any, d: any) => void;
|
|
325
313
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
326
314
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
327
315
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/diaryx_wasm.js
CHANGED
|
@@ -137,15 +137,6 @@ export class DiaryxBackend {
|
|
|
137
137
|
const ret = wasm.diaryxbackend_executeJs(this.__wbg_ptr, command);
|
|
138
138
|
return ret;
|
|
139
139
|
}
|
|
140
|
-
/**
|
|
141
|
-
* Get the current configuration from root index frontmatter.
|
|
142
|
-
* Config keys are stored as `diaryx_*` properties.
|
|
143
|
-
* @returns {Promise<any>}
|
|
144
|
-
*/
|
|
145
|
-
getConfig() {
|
|
146
|
-
const ret = wasm.diaryxbackend_getConfig(this.__wbg_ptr);
|
|
147
|
-
return ret;
|
|
148
|
-
}
|
|
149
140
|
/**
|
|
150
141
|
* Check if this backend has native sync support.
|
|
151
142
|
* Always false — sync is handled by the Extism sync plugin loaded at runtime.
|
|
@@ -222,16 +213,6 @@ export class DiaryxBackend {
|
|
|
222
213
|
const ret = wasm.diaryxbackend_readBinary(this.__wbg_ptr, ptr0, len0);
|
|
223
214
|
return ret;
|
|
224
215
|
}
|
|
225
|
-
/**
|
|
226
|
-
* Save configuration to root index frontmatter.
|
|
227
|
-
* Config keys are stored as `diaryx_*` properties.
|
|
228
|
-
* @param {any} config_js
|
|
229
|
-
* @returns {Promise<any>}
|
|
230
|
-
*/
|
|
231
|
-
saveConfig(config_js) {
|
|
232
|
-
const ret = wasm.diaryxbackend_saveConfig(this.__wbg_ptr, config_js);
|
|
233
|
-
return ret;
|
|
234
|
-
}
|
|
235
216
|
/**
|
|
236
217
|
* No-op — CrdtFs is not used; sync handled by Extism plugin.
|
|
237
218
|
* @param {boolean} _enabled
|
|
@@ -626,7 +607,7 @@ function __wbg_get_imports() {
|
|
|
626
607
|
const a = state0.a;
|
|
627
608
|
state0.a = 0;
|
|
628
609
|
try {
|
|
629
|
-
return
|
|
610
|
+
return wasm_bindgen__convert__closures_____invoke__h229fb34ceaba2930(a, state0.b, arg0, arg1);
|
|
630
611
|
} finally {
|
|
631
612
|
state0.a = a;
|
|
632
613
|
}
|
|
@@ -649,10 +630,6 @@ function __wbg_get_imports() {
|
|
|
649
630
|
const ret = arg0.next;
|
|
650
631
|
return ret;
|
|
651
632
|
},
|
|
652
|
-
__wbg_parse_e9eddd2a82c706eb: function() { return handleError(function (arg0, arg1) {
|
|
653
|
-
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
654
|
-
return ret;
|
|
655
|
-
}, arguments); },
|
|
656
633
|
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
657
634
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
658
635
|
},
|
|
@@ -700,10 +677,6 @@ function __wbg_get_imports() {
|
|
|
700
677
|
const ret = typeof window === 'undefined' ? null : window;
|
|
701
678
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
702
679
|
},
|
|
703
|
-
__wbg_stringify_5ae93966a84901ac: function() { return handleError(function (arg0) {
|
|
704
|
-
const ret = JSON.stringify(arg0);
|
|
705
|
-
return ret;
|
|
706
|
-
}, arguments); },
|
|
707
680
|
__wbg_then_098abe61755d12f6: function(arg0, arg1) {
|
|
708
681
|
const ret = arg0.then(arg1);
|
|
709
682
|
return ret;
|
|
@@ -724,8 +697,8 @@ function __wbg_get_imports() {
|
|
|
724
697
|
console.warn(arg0, arg1, arg2, arg3);
|
|
725
698
|
},
|
|
726
699
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
727
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
728
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
700
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 419, function: Function { arguments: [Externref], shim_idx: 420, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
701
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hc0ecfed3f77ea255, wasm_bindgen__convert__closures_____invoke__h2b2515b80a4dcf5e);
|
|
729
702
|
return ret;
|
|
730
703
|
},
|
|
731
704
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -764,15 +737,15 @@ function __wbg_get_imports() {
|
|
|
764
737
|
};
|
|
765
738
|
}
|
|
766
739
|
|
|
767
|
-
function
|
|
768
|
-
const ret = wasm.
|
|
740
|
+
function wasm_bindgen__convert__closures_____invoke__h2b2515b80a4dcf5e(arg0, arg1, arg2) {
|
|
741
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h2b2515b80a4dcf5e(arg0, arg1, arg2);
|
|
769
742
|
if (ret[1]) {
|
|
770
743
|
throw takeFromExternrefTable0(ret[0]);
|
|
771
744
|
}
|
|
772
745
|
}
|
|
773
746
|
|
|
774
|
-
function
|
|
775
|
-
wasm.
|
|
747
|
+
function wasm_bindgen__convert__closures_____invoke__h229fb34ceaba2930(arg0, arg1, arg2, arg3) {
|
|
748
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h229fb34ceaba2930(arg0, arg1, arg2, arg3);
|
|
776
749
|
}
|
|
777
750
|
|
|
778
751
|
const DiaryxBackendFinalization = (typeof FinalizationRegistry === 'undefined')
|
package/diaryx_wasm_bg.wasm
CHANGED
|
Binary file
|
package/diaryx_wasm_bg.wasm.d.ts
CHANGED
|
@@ -10,12 +10,10 @@ export const diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number
|
|
|
10
10
|
export const diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
11
11
|
export const diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
12
12
|
export const diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
13
|
-
export const diaryxbackend_getConfig: (a: number) => any;
|
|
14
13
|
export const diaryxbackend_hasNativeSync: (a: number) => number;
|
|
15
14
|
export const diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
16
15
|
export const diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
17
16
|
export const diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
18
|
-
export const diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
19
17
|
export const diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
|
|
20
18
|
export const diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
21
19
|
export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
@@ -24,9 +22,9 @@ export const now_timestamp: () => [number, number];
|
|
|
24
22
|
export const today_formatted: (a: number, b: number) => [number, number];
|
|
25
23
|
export const init: () => void;
|
|
26
24
|
export const diaryxbackend_isCrdtEnabled: (a: number) => number;
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
25
|
+
export const wasm_bindgen__closure__destroy__hc0ecfed3f77ea255: (a: number, b: number) => void;
|
|
26
|
+
export const wasm_bindgen__convert__closures_____invoke__h2b2515b80a4dcf5e: (a: number, b: number, c: any) => [number, number];
|
|
27
|
+
export const wasm_bindgen__convert__closures_____invoke__h229fb34ceaba2930: (a: number, b: number, c: any, d: any) => void;
|
|
30
28
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
31
29
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
32
30
|
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.0-dev.
|
|
5
|
+
"version": "1.4.0-dev.dd1af96",
|
|
6
6
|
"license": "SEE LICENSE IN ../../LICENSE.md",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|