holos-wasm 0.16.0 → 0.18.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 CHANGED
@@ -30,18 +30,49 @@ const holos = require('./pkg-node/holos_wasm.js');
30
30
  const store = new holos.Store();
31
31
  store.loadTurtle('<urn:a> <urn:p> "x" .', undefined);
32
32
 
33
- store.query('ASK { ?s ?p ?o }', undefined); // boolean
34
- store.query('SELECT ?s WHERE { ?s ?p ?o }', undefined); // [{ s: '<urn:a>' }]
33
+ store.query('ASK { ?s ?p ?o }', undefined); // true
34
+ store.query('SELECT ?s WHERE { ?s ?p ?o }', undefined); // [{ s: { termType: 'NamedNode',
35
+ // value: 'urn:a' } }]
35
36
  store.query('CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o }', undefined);
36
- // ['<urn:a> <urn:p> "x"']
37
+ // ['<urn:a> <urn:p> "x"']
38
+ store.queryRdf('CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o }', 'turtle', undefined);
39
+ // '<urn:a> <urn:p> "x" .
40
+ '
41
+ store.update('INSERT DATA { <urn:b> <urn:p> "y" }', undefined);
42
+ // { inserted: 1, deleted: 0, graphsCreated: 0, … }
43
+ store.dump('nquads'); // everything the store holds
37
44
  ```
38
45
 
39
- A CONSTRUCT comes back as N-Triples strings, one per triple, with no trailing separator.
40
- That is the same mapping `holos-python` uses, and N-Triples specifically because it is the
41
- one serialisation every RDF library in JS can parse without first agreeing on a term model.
46
+ | What you get back | From |
47
+ |---|---|
48
+ | `true` / `false` | ASK |
49
+ | terms in rdf-js shape — `{termType, value}`, plus `language` and `datatype` on a literal | SELECT |
50
+ | N-Triples strings, one per triple, no trailing separator | CONSTRUCT, DESCRIBE |
51
+ | a document in the format you asked for | `queryRdf` |
52
+ | `{inserted, deleted, graphsCreated, graphsDropped}` | `update` |
53
+
54
+ **SELECT returns terms, not strings, since 0.17.0.** They used to be N-Triples strings,
55
+ which made every consumer parse term syntax to reach a value, and no RDF library in JS
56
+ accepts a bare term string as input. `{termType, value}` is what rdf-js specifies and what
57
+ oxigraph returns, so a term can go straight to n3 or be compared field by field. A blank
58
+ node's `value` is the bare label, without `_:` — and it is this engine's label, not the one
59
+ in whatever document was loaded, because a parser may rename blank nodes and this one does.
60
+
61
+ CONSTRUCT stays N-Triples strings deliberately: it is the one serialisation every RDF
62
+ library in JS parses without first agreeing on a term model, and a graph is usually wanted
63
+ as a graph. `queryRdf` is there when a *document* is wanted instead — a preview pane showing
64
+ Turtle, or a payload for something that parses RDF but does not speak these shapes.
65
+
42
66
  An unbound variable is left *off* a SELECT row rather than set to `null`: RDF has no null,
43
67
  and "no value here" is a different fact from "the value null".
44
68
 
69
+ `dump` is a document rather than a quad iterator, because crossing the boundary once with a
70
+ document beats crossing it once per quad and every JS RDF library can parse what comes back.
71
+ Use `nquads` or `trig` for a store with named graphs: Turtle and N-Triples have nowhere to
72
+ put a graph name, and the serialiser **refuses** such a quad rather than writing it into the
73
+ default graph. That is the right choice — flattening would move data between graphs while
74
+ reporting success — and the error names the formats that work.
75
+
45
76
  ## What this build cannot do
46
77
 
47
78
  Each of these is a property of the host, not of the engine. None is a stripped-down
@@ -54,11 +85,70 @@ facilities.
54
85
  | **No file paths** | `std::fs` compiles for wasm32 and fails at runtime. RDF arrives as a string the host has already read, so a load costs memory proportional to the document — a browser tab is not where a 60 GB dump goes. |
55
86
  | **No spilling `ORDER BY`** | The external merge sort needs somewhere to put run files. A sort is bounded by memory here, and a large one exhausts the module rather than reaching for disk. |
56
87
  | **No timeout, no memory ceiling** | Both are enforced by a watchdog thread sampling a clock, and this target has neither. `QueryOptions::guard` returns `None`, and this crate exposes no way to ask — so nobody can set a limit and believe it is being honoured. |
88
+ | **No network** | There is no HTTP client in here at all. `SERVICE` works, but only because the *host* fetches and hands the answer in — see below. |
57
89
  | **One thread** | A load parses and interns in one serial loop rather than overlapping them. Same answer, same order, less throughput. |
58
90
 
59
91
  Bringing the timeout back means a cooperative deadline checked in the row loop, with the
60
92
  clock routed through the host. That is the one reduction above that is worth revisiting.
61
93
 
94
+ ## `SERVICE`, without a network client
95
+
96
+ `store.query()` cannot answer a `SERVICE` clause. `store.queryFederated()` can, by asking the
97
+ host to do the fetching:
98
+
99
+ ```js
100
+ for (let round = 0; round < 8; round += 1) {
101
+ const pass = store.queryFederated(query, undefined);
102
+ if (!pass.pending.length) return pass.result;
103
+ for (const { endpoint, query: ask } of pass.pending) {
104
+ // The host decides what may be called. Nothing in the wasm can reach the network.
105
+ const res = await fetch(endpoint, {
106
+ method: 'POST',
107
+ headers: { 'Content-Type': 'application/sparql-query',
108
+ Accept: 'application/sparql-results+json' },
109
+ body: ask,
110
+ });
111
+ store.cacheService(endpoint, ask, await res.text());
112
+ }
113
+ }
114
+ throw new Error('SERVICE did not settle');
115
+ ```
116
+
117
+ **A pass with anything `pending` has wrong results, and says so by having them.** The
118
+ unanswered `SERVICE` contributed no rows, so the join above it lost rows too. Discard `result`
119
+ whenever `pending` is non-empty rather than showing it.
120
+
121
+ ### Why it is shaped like this
122
+
123
+ `spareval::DefaultServiceHandler::handle` is synchronous and `fetch` is not, and you cannot
124
+ await a Promise from synchronous wasm. Three ways round that, and they commit you to different
125
+ things:
126
+
127
+ | | Cost |
128
+ |---|---|
129
+ | synchronous `XMLHttpRequest` | deprecated, warns in every browser, blocks the tab, may stop working |
130
+ | a worker blocking on `Atomics.wait` | needs COOP/COEP cross-origin-isolation headers wherever the app is hosted, and breaks quietly if they are lost |
131
+ | **asking twice** | the query is evaluated more than once |
132
+
133
+ The third is what this does. It buys no deprecated API, no hosting requirement, and an
134
+ allow-list that lives in the host — which is the part that matters. `holos-engine`'s own
135
+ `service` module refuses remote `SERVICE` because on a *server* it is an SSRF primitive: a
136
+ query from a stranger makes the server fetch an address of the stranger's choosing. That
137
+ objection does not transfer here, and not because a browser is safer — because **this crate
138
+ cannot make a request at all**. There is nothing to point anywhere. The fetch is the host's, in
139
+ the user's own browser, with the user's own network position and CORS between them.
140
+
141
+ ### More than two rounds is normal
142
+
143
+ A `SERVICE` whose pattern carries bindings from an earlier join only takes its final shape once
144
+ that join has rows, and the first pass gives it none — so an answer can reveal a request that
145
+ could not have been seen before. The same semi-naive iteration the rules engine uses. The cap
146
+ belongs to the host, because only the host knows how long it will wait.
147
+
148
+ The cache key is `(endpoint, query)` and the query is byte-exact: a reformatted query is a
149
+ different question and will be asked again. That is deliberate — matching a near-miss would
150
+ serve one endpoint's answer to another's question.
151
+
62
152
  ## Four things had to be cfg-ed for this target
63
153
 
64
154
  The compile-time surface was almost nothing — one getrandom error. The work was runtime:
package/holos_wasm.d.ts CHANGED
@@ -7,6 +7,29 @@
7
7
  export class Store {
8
8
  free(): void;
9
9
  [Symbol.dispose](): void;
10
+ /**
11
+ * Give the store an endpoint's answer to one of `queryFederated`'s pending queries.
12
+ *
13
+ * `results` is SPARQL Results JSON, which is what an endpoint returns for
14
+ * `Accept: application/sparql-results+json`. `query` must be the string the pending entry
15
+ * carried, byte for byte: it is the cache key, so a reformatted query is a different
16
+ * question and will be asked again.
17
+ */
18
+ cacheService(endpoint: string, query: string, results: string): void;
19
+ /**
20
+ * Everything the store holds, serialised in `format`.
21
+ *
22
+ * Use N-Quads or TriG for a store with named graphs. Turtle and N-Triples have nowhere
23
+ * to put a graph name, and the serialiser **refuses** such a quad rather than writing
24
+ * it into the default graph — measured, and the right behaviour: flattening would move
25
+ * data between graphs while reporting success. The error says which formats can carry
26
+ * it. A store with only a default graph serialises to any of the four.
27
+ *
28
+ * This is how a caller enumerates the store: there is no quad iterator on this binding,
29
+ * because crossing the boundary once with a document beats crossing it once per quad,
30
+ * and every JS RDF library can parse what comes back.
31
+ */
32
+ dump(format: string): string;
10
33
  /**
11
34
  * Load Turtle, which is the common case.
12
35
  */
@@ -22,18 +45,77 @@ export class Store {
22
45
  * A new, empty store.
23
46
  */
24
47
  constructor();
48
+ /**
49
+ * Run a query that may contain `SERVICE`, one pass at a time.
50
+ *
51
+ * Returns `{pending: [{endpoint, query}, …]}` when the engine asked for an endpoint this
52
+ * store has no answer for, and `{result: …}` -- shaped exactly as `query` returns -- when
53
+ * it did not. The host fetches each pending query, hands it back with `cacheService`, and
54
+ * calls this again:
55
+ *
56
+ * ```js
57
+ * for (let round = 0; round < 8; round += 1) {
58
+ * const pass = store.queryFederated(q, undefined);
59
+ * if (!pass.pending.length) return pass.result;
60
+ * for (const { endpoint, query } of pass.pending) {
61
+ * // The host decides what may be called. Nothing in the wasm can reach the network.
62
+ * store.cacheService(endpoint, query, await fetchSparqlJson(endpoint, query));
63
+ * }
64
+ * }
65
+ * throw new Error('SERVICE did not settle');
66
+ * ```
67
+ *
68
+ * **A pass with anything pending has wrong results, and says so by having them.** The
69
+ * unanswered `SERVICE` contributed no rows, so the join above it lost rows too. Discard
70
+ * `result` whenever `pending` is non-empty rather than showing it.
71
+ *
72
+ * More than two rounds are possible and not a fault: a `SERVICE` whose pattern carries
73
+ * bindings from an earlier join only takes its final shape once that join has rows, so an
74
+ * answer can reveal a request that could not have been seen before. The cap belongs to the
75
+ * host because only the host knows how long it is prepared to wait.
76
+ *
77
+ * A query with no `SERVICE` never consults the handler, so `pending` is empty and this is
78
+ * `query` with one more allocation.
79
+ */
80
+ queryFederated(query: string, base?: string | null): any;
81
+ /**
82
+ * Run a CONSTRUCT or DESCRIBE and return the graph serialised in `format`.
83
+ *
84
+ * For when a caller wants a *document* rather than terms: a preview pane showing
85
+ * Turtle, or a payload to hand to something that parses RDF but does not speak this
86
+ * binding's shapes. `query` remains the way to get the triples themselves.
87
+ *
88
+ * A SELECT or ASK is refused rather than serialised, because neither produces a graph
89
+ * and "here is an empty document" would be the wrong way to say so.
90
+ */
91
+ queryRdf(query: string, format: string, base?: string | null): string;
25
92
  /**
26
93
  * Run a SPARQL 1.2 query.
27
94
  *
28
95
  * Returns a boolean for ASK, an array of N-Triples strings for CONSTRUCT and DESCRIBE,
29
- * and an array of objects keyed by variable name for SELECT — the same mapping the
30
- * Python bindings use. N-Triples specifically, because it is the one serialisation
31
- * every RDF library in JS can parse without first agreeing on a term model.
96
+ * and for SELECT an array of objects keyed by variable name whose values are terms in
97
+ * RDF/JS shape — `{termType, value}`, plus `language` and `datatype` on a literal.
98
+ *
99
+ * **Terms rather than strings, since 0.17.0.** They were rendered as N-Triples strings,
100
+ * which made every consumer parse term syntax to get at a value, and no RDF library in
101
+ * JS accepts a bare term string as input. `{termType, value}` is what rdf-js specifies
102
+ * and what oxigraph returns, so a caller can hand these straight to n3 or compare them
103
+ * field by field. `queryRdf` is there for when a *document* is wanted instead.
32
104
  *
33
- * A returned triple carries no trailing separator, which also matches the Python
34
- * bindings; a caller reassembling a document adds one.
105
+ * CONSTRUCT stays N-Triples strings, deliberately: it is one serialisation every RDF
106
+ * library in JS can parse without first agreeing on a term model, and a graph is
107
+ * usually wanted as a graph. A returned triple carries no trailing separator, matching
108
+ * the Python bindings; a caller reassembling a document adds one.
35
109
  */
36
110
  query(query: string, base?: string | null): any;
111
+ /**
112
+ * Apply a SPARQL 1.1 Update, returning what changed:
113
+ * `{inserted, deleted, graphsCreated, graphsDropped}`.
114
+ *
115
+ * **All-or-nothing.** If any operation fails the store is left exactly as it was, so a
116
+ * refused write cannot leave half an update behind.
117
+ */
118
+ update(update: string, base?: string | null): any;
37
119
  /**
38
120
  * Distinct terms in the dictionary.
39
121
  *
package/holos_wasm_bg.js CHANGED
@@ -12,6 +12,26 @@ export class Store {
12
12
  const ptr = this.__destroy_into_raw();
13
13
  wasm.__wbg_store_free(ptr, 0);
14
14
  }
15
+ /**
16
+ * Give the store an endpoint's answer to one of `queryFederated`'s pending queries.
17
+ *
18
+ * `results` is SPARQL Results JSON, which is what an endpoint returns for
19
+ * `Accept: application/sparql-results+json`. `query` must be the string the pending entry
20
+ * carried, byte for byte: it is the cache key, so a reformatted query is a different
21
+ * question and will be asked again.
22
+ * @param {string} endpoint
23
+ * @param {string} query
24
+ * @param {string} results
25
+ */
26
+ cacheService(endpoint, query, results) {
27
+ const ptr0 = passStringToWasm0(endpoint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
28
+ const len0 = WASM_VECTOR_LEN;
29
+ const ptr1 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
30
+ const len1 = WASM_VECTOR_LEN;
31
+ const ptr2 = passStringToWasm0(results, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
32
+ const len2 = WASM_VECTOR_LEN;
33
+ wasm.store_cacheService(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
34
+ }
15
35
  /**
16
36
  * Distinct terms in the dictionary.
17
37
  *
@@ -23,6 +43,41 @@ export class Store {
23
43
  const ret = wasm.store_dictionarySize(this.__wbg_ptr);
24
44
  return ret >>> 0;
25
45
  }
46
+ /**
47
+ * Everything the store holds, serialised in `format`.
48
+ *
49
+ * Use N-Quads or TriG for a store with named graphs. Turtle and N-Triples have nowhere
50
+ * to put a graph name, and the serialiser **refuses** such a quad rather than writing
51
+ * it into the default graph — measured, and the right behaviour: flattening would move
52
+ * data between graphs while reporting success. The error says which formats can carry
53
+ * it. A store with only a default graph serialises to any of the four.
54
+ *
55
+ * This is how a caller enumerates the store: there is no quad iterator on this binding,
56
+ * because crossing the boundary once with a document beats crossing it once per quad,
57
+ * and every JS RDF library can parse what comes back.
58
+ * @param {string} format
59
+ * @returns {string}
60
+ */
61
+ dump(format) {
62
+ let deferred3_0;
63
+ let deferred3_1;
64
+ try {
65
+ const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
66
+ const len0 = WASM_VECTOR_LEN;
67
+ const ret = wasm.store_dump(this.__wbg_ptr, ptr0, len0);
68
+ var ptr2 = ret[0];
69
+ var len2 = ret[1];
70
+ if (ret[3]) {
71
+ ptr2 = 0; len2 = 0;
72
+ throw takeFromExternrefTable0(ret[2]);
73
+ }
74
+ deferred3_0 = ptr2;
75
+ deferred3_1 = len2;
76
+ return getStringFromWasm0(ptr2, len2);
77
+ } finally {
78
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
79
+ }
80
+ }
26
81
  /**
27
82
  * Load Turtle, which is the common case.
28
83
  * @param {string} text
@@ -72,16 +127,107 @@ export class Store {
72
127
  StoreFinalization.register(this, this.__wbg_ptr, this);
73
128
  return this;
74
129
  }
130
+ /**
131
+ * Run a query that may contain `SERVICE`, one pass at a time.
132
+ *
133
+ * Returns `{pending: [{endpoint, query}, …]}` when the engine asked for an endpoint this
134
+ * store has no answer for, and `{result: …}` -- shaped exactly as `query` returns -- when
135
+ * it did not. The host fetches each pending query, hands it back with `cacheService`, and
136
+ * calls this again:
137
+ *
138
+ * ```js
139
+ * for (let round = 0; round < 8; round += 1) {
140
+ * const pass = store.queryFederated(q, undefined);
141
+ * if (!pass.pending.length) return pass.result;
142
+ * for (const { endpoint, query } of pass.pending) {
143
+ * // The host decides what may be called. Nothing in the wasm can reach the network.
144
+ * store.cacheService(endpoint, query, await fetchSparqlJson(endpoint, query));
145
+ * }
146
+ * }
147
+ * throw new Error('SERVICE did not settle');
148
+ * ```
149
+ *
150
+ * **A pass with anything pending has wrong results, and says so by having them.** The
151
+ * unanswered `SERVICE` contributed no rows, so the join above it lost rows too. Discard
152
+ * `result` whenever `pending` is non-empty rather than showing it.
153
+ *
154
+ * More than two rounds are possible and not a fault: a `SERVICE` whose pattern carries
155
+ * bindings from an earlier join only takes its final shape once that join has rows, so an
156
+ * answer can reveal a request that could not have been seen before. The cap belongs to the
157
+ * host because only the host knows how long it is prepared to wait.
158
+ *
159
+ * A query with no `SERVICE` never consults the handler, so `pending` is empty and this is
160
+ * `query` with one more allocation.
161
+ * @param {string} query
162
+ * @param {string | null} [base]
163
+ * @returns {any}
164
+ */
165
+ queryFederated(query, base) {
166
+ const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
167
+ const len0 = WASM_VECTOR_LEN;
168
+ var ptr1 = isLikeNone(base) ? 0 : passStringToWasm0(base, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
169
+ var len1 = WASM_VECTOR_LEN;
170
+ const ret = wasm.store_queryFederated(this.__wbg_ptr, ptr0, len0, ptr1, len1);
171
+ if (ret[2]) {
172
+ throw takeFromExternrefTable0(ret[1]);
173
+ }
174
+ return takeFromExternrefTable0(ret[0]);
175
+ }
176
+ /**
177
+ * Run a CONSTRUCT or DESCRIBE and return the graph serialised in `format`.
178
+ *
179
+ * For when a caller wants a *document* rather than terms: a preview pane showing
180
+ * Turtle, or a payload to hand to something that parses RDF but does not speak this
181
+ * binding's shapes. `query` remains the way to get the triples themselves.
182
+ *
183
+ * A SELECT or ASK is refused rather than serialised, because neither produces a graph
184
+ * and "here is an empty document" would be the wrong way to say so.
185
+ * @param {string} query
186
+ * @param {string} format
187
+ * @param {string | null} [base]
188
+ * @returns {string}
189
+ */
190
+ queryRdf(query, format, base) {
191
+ let deferred5_0;
192
+ let deferred5_1;
193
+ try {
194
+ const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
195
+ const len0 = WASM_VECTOR_LEN;
196
+ const ptr1 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
197
+ const len1 = WASM_VECTOR_LEN;
198
+ var ptr2 = isLikeNone(base) ? 0 : passStringToWasm0(base, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
199
+ var len2 = WASM_VECTOR_LEN;
200
+ const ret = wasm.store_queryRdf(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
201
+ var ptr4 = ret[0];
202
+ var len4 = ret[1];
203
+ if (ret[3]) {
204
+ ptr4 = 0; len4 = 0;
205
+ throw takeFromExternrefTable0(ret[2]);
206
+ }
207
+ deferred5_0 = ptr4;
208
+ deferred5_1 = len4;
209
+ return getStringFromWasm0(ptr4, len4);
210
+ } finally {
211
+ wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
212
+ }
213
+ }
75
214
  /**
76
215
  * Run a SPARQL 1.2 query.
77
216
  *
78
217
  * Returns a boolean for ASK, an array of N-Triples strings for CONSTRUCT and DESCRIBE,
79
- * and an array of objects keyed by variable name for SELECT — the same mapping the
80
- * Python bindings use. N-Triples specifically, because it is the one serialisation
81
- * every RDF library in JS can parse without first agreeing on a term model.
218
+ * and for SELECT an array of objects keyed by variable name whose values are terms in
219
+ * RDF/JS shape — `{termType, value}`, plus `language` and `datatype` on a literal.
220
+ *
221
+ * **Terms rather than strings, since 0.17.0.** They were rendered as N-Triples strings,
222
+ * which made every consumer parse term syntax to get at a value, and no RDF library in
223
+ * JS accepts a bare term string as input. `{termType, value}` is what rdf-js specifies
224
+ * and what oxigraph returns, so a caller can hand these straight to n3 or compare them
225
+ * field by field. `queryRdf` is there for when a *document* is wanted instead.
82
226
  *
83
- * A returned triple carries no trailing separator, which also matches the Python
84
- * bindings; a caller reassembling a document adds one.
227
+ * CONSTRUCT stays N-Triples strings, deliberately: it is one serialisation every RDF
228
+ * library in JS can parse without first agreeing on a term model, and a graph is
229
+ * usually wanted as a graph. A returned triple carries no trailing separator, matching
230
+ * the Python bindings; a caller reassembling a document adds one.
85
231
  * @param {string} query
86
232
  * @param {string | null} [base]
87
233
  * @returns {any}
@@ -105,6 +251,27 @@ export class Store {
105
251
  const ret = wasm.store_size(this.__wbg_ptr);
106
252
  return ret >>> 0;
107
253
  }
254
+ /**
255
+ * Apply a SPARQL 1.1 Update, returning what changed:
256
+ * `{inserted, deleted, graphsCreated, graphsDropped}`.
257
+ *
258
+ * **All-or-nothing.** If any operation fails the store is left exactly as it was, so a
259
+ * refused write cannot leave half an update behind.
260
+ * @param {string} update
261
+ * @param {string | null} [base]
262
+ * @returns {any}
263
+ */
264
+ update(update, base) {
265
+ const ptr0 = passStringToWasm0(update, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
266
+ const len0 = WASM_VECTOR_LEN;
267
+ var ptr1 = isLikeNone(base) ? 0 : passStringToWasm0(base, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
268
+ var len1 = WASM_VECTOR_LEN;
269
+ const ret = wasm.store_update(this.__wbg_ptr, ptr0, len0, ptr1, len1);
270
+ if (ret[2]) {
271
+ throw takeFromExternrefTable0(ret[1]);
272
+ }
273
+ return takeFromExternrefTable0(ret[0]);
274
+ }
108
275
  }
109
276
  if (Symbol.dispose) Store.prototype[Symbol.dispose] = Store.prototype.free;
110
277
 
@@ -166,7 +333,12 @@ export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
166
333
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
167
334
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
168
335
  }
169
- export function __wbindgen_generic_0000000000000001(arg0, arg1) {
336
+ export function __wbindgen_generic_0000000000000001(arg0) {
337
+ // Cast intrinsic for `F64 -> Externref`.
338
+ const ret = arg0;
339
+ return ret;
340
+ }
341
+ export function __wbindgen_generic_0000000000000002(arg0, arg1) {
170
342
  // Cast intrinsic for `Ref(String) -> Externref`.
171
343
  const ret = getStringFromWasm0(arg0, arg1);
172
344
  return ret;
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "holos-wasm",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for the HOLOS RDF 1.2 store and SPARQL 1.2 engine (ESM, for bundlers)",
5
- "version": "0.16.0",
5
+ "version": "0.18.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",