@webpodjs/abi 0.0.0-stage → 0.1.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
@@ -1,3 +1,19 @@
1
- # Temporary Holding Version
1
+ # @webpodjs/abi
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ TypeScript implementation of the webpod ring ABI (docs/abi.md), byte-compatible with
4
+ `crates/webpod-abi` and the engine's C side. Used by the engine Worker, the host's device Workers
5
+ and the SDK (which copies `src/ring.ts` at build time so its `dist/` stays dependency-free).
6
+
7
+ ```ts
8
+ import { Ring, RingProducer, RingConsumer, waitForMessage } from "@webpodjs/abi";
9
+
10
+ Ring.init(memory, offset, 64 * 1024); // engine: format a ring in its wasm memory
11
+ const rx = new RingConsumer(memory, offset); // attach: validates, never rewrites the header
12
+ for (;;) {
13
+ const m = rx.peek(); // zero-copy view, valid until release()
14
+ if (!m) { await waitForMessage(rx); continue; } // waitAsync + watchdog (WebKit, P1 #133)
15
+ handle(m.bytes);
16
+ m.release(); // returns whether the producer was woken
17
+ }
18
+ await new RingProducer(memory, other).pushAsync(bytes);
19
+ ```
@@ -0,0 +1 @@
1
+ export * from "./ring.js";
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ // @webpodjs/abi: TypeScript side of docs/abi.md (rings), shared by the engine Worker, host Workers and the SDK.
2
+ export * from "./ring.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAChH,cAAc,WAAW,CAAC"}
package/dist/ring.d.ts ADDED
@@ -0,0 +1,79 @@
1
+ export declare const RING_MAGIC = 1196576855;
2
+ export declare const RING_VERSION = 1;
3
+ export declare const RING_HEADER_SIZE = 256;
4
+ export declare class RingError extends Error {
5
+ readonly kind: "corrupt" | "too-large" | "bad-header";
6
+ constructor(kind: "corrupt" | "too-large" | "bad-header", message: string);
7
+ }
8
+ /** Formats a ring with `capacity` data bytes (power of two, 64 B .. 1 GiB) at `byteOffset`. */
9
+ export declare function initRing(buffer: SharedArrayBuffer, byteOffset: number, capacity: number): void;
10
+ /** Allocates a SharedArrayBuffer holding one formatted ring (tests, host-owned rings). */
11
+ export declare function createRing(capacity: number): SharedArrayBuffer;
12
+ /** Producer half. Only one producer may exist per ring. */
13
+ export declare class RingProducer {
14
+ #private;
15
+ /** Attaches to a formatted ring at `byteOffset` (e.g. inside the engine's wasm memory). */
16
+ constructor(buffer: SharedArrayBuffer, byteOffset?: number);
17
+ get maxMessageLen(): number;
18
+ /** Pushes `msg`, waiting (without blocking the thread) while the ring is full. */
19
+ pushAsync(msg: Uint8Array, options?: WaitOptions): Promise<void>;
20
+ /** Pushes one message; false when the ring is full. Wakes a sleeping consumer. */
21
+ tryPush(msg: Uint8Array): boolean;
22
+ /** Announces that the producer will sleep until `len` bytes fit; false if they already do. */
23
+ prepareWait(len: number): boolean;
24
+ /**
25
+ * The word and value to wait on after a successful prepareWait: the tail that prepareWait saw
26
+ * the ring full at. Re-reading tail here would lose the wake-up when the consumer frees space
27
+ * in between (it clears producer_waiting and notifies before we sleep, then never again).
28
+ */
29
+ waitTarget(): [Int32Array, number, number];
30
+ }
31
+ /** Consumer half. Only one consumer may exist per ring. */
32
+ export declare class RingConsumer {
33
+ #private;
34
+ constructor(buffer: SharedArrayBuffer, byteOffset?: number);
35
+ hasMessages(): boolean;
36
+ /**
37
+ * The next message without copying, or null when empty. `bytes` views shared memory and is valid
38
+ * until `release()`, which consumes it and wakes a waiting producer (returns whether it did).
39
+ * Not releasing leaves the message in place: the next peek returns it again.
40
+ *
41
+ * head is cached and reloaded (and validated) only when the cached value shows the ring empty,
42
+ * so a producer that corrupts head is detected at that reload rather than on the very next peek.
43
+ * Records are validated either way, so a corrupt peer can never cause an out-of-bounds access.
44
+ */
45
+ peek(): RingMessage | null;
46
+ /** Pops (copies and releases) the next message, or null when empty. Wakes a waiting producer. */
47
+ tryPop(): Uint8Array | null;
48
+ /** Alias of `tryPop` (webpod_abi naming). */
49
+ pop(): Uint8Array | null;
50
+ /** Pops everything currently in the ring. */
51
+ drain(max?: number): Uint8Array[];
52
+ /** Announces that the consumer will sleep; false if messages arrived meanwhile. */
53
+ prepareWait(): boolean;
54
+ waitTarget(): [Int32Array, number, number];
55
+ }
56
+ export interface RingMessage {
57
+ readonly bytes: Uint8Array;
58
+ release(): boolean;
59
+ }
60
+ export interface WaitOptions {
61
+ /** Upper bound on one sleep: WebKit can lose waitAsync wake-ups (P1 #133). Default 50 ms. */
62
+ watchdogMs?: number;
63
+ signal?: AbortSignal;
64
+ }
65
+ /** Waits until the consumer has a message (or the watchdog fires; callers just re-check). */
66
+ export declare function waitReadable(c: RingConsumer, options?: WaitOptions): Promise<void>;
67
+ /** Waits until `len` bytes may fit (or the watchdog fires). */
68
+ export declare function waitWritable(p: RingProducer, len: number, options?: WaitOptions): Promise<void>;
69
+ /** Names matching webpod_abi (`Ring::init` / `Ring::attach`), for engine-side code. */
70
+ export declare const Ring: {
71
+ init: typeof initRing;
72
+ /** Validates an existing ring at `byteOffset` (never rewrites its header). */
73
+ attach(buffer: SharedArrayBuffer, byteOffset?: number): {
74
+ producer: () => RingProducer;
75
+ consumer: () => RingConsumer;
76
+ };
77
+ };
78
+ export declare const waitForMessage: typeof waitReadable;
79
+ export declare const waitForSpace: typeof waitWritable;
package/dist/ring.js ADDED
@@ -0,0 +1,317 @@
1
+ // SPSC message ring over a SharedArrayBuffer, byte-compatible with webpod_abi::ring (docs/abi.md).
2
+ // Source of truth for every TS user (engine Worker, host Workers, SDK); the SDK build copies it.
3
+ export const RING_MAGIC = 0x47525057; // "WPRG"
4
+ export const RING_VERSION = 1;
5
+ export const RING_HEADER_SIZE = 256;
6
+ const HEAD = 64 / 4;
7
+ const TAIL = 128 / 4;
8
+ const CONSUMER_WAITING = 192 / 4;
9
+ const PRODUCER_WAITING = 196 / 4;
10
+ const PAD = 0xffffffff;
11
+ const MIN_CAPACITY = 64;
12
+ const MAX_CAPACITY = 1 << 30;
13
+ export class RingError extends Error {
14
+ kind;
15
+ constructor(kind, message) {
16
+ super(message);
17
+ this.kind = kind;
18
+ this.name = "RingError";
19
+ }
20
+ }
21
+ const padded = (len) => (len + 3) & ~3;
22
+ /** Formats a ring with `capacity` data bytes (power of two, 64 B .. 1 GiB) at `byteOffset`. */
23
+ export function initRing(buffer, byteOffset, capacity) {
24
+ if (capacity < MIN_CAPACITY || capacity > MAX_CAPACITY || (capacity & (capacity - 1)) !== 0) {
25
+ throw new RingError("bad-header", `bad ring capacity ${capacity}`);
26
+ }
27
+ if (byteOffset % 64 !== 0 || byteOffset + RING_HEADER_SIZE + capacity > buffer.byteLength) {
28
+ throw new RingError("bad-header", "ring region is misaligned or too small");
29
+ }
30
+ const words = new Int32Array(buffer, byteOffset, RING_HEADER_SIZE / 4);
31
+ for (let i = 0; i < words.length; i++)
32
+ Atomics.store(words, i, 0);
33
+ Atomics.store(words, 2, capacity);
34
+ Atomics.store(words, 1, RING_VERSION);
35
+ Atomics.store(words, 0, RING_MAGIC | 0);
36
+ }
37
+ /** Allocates a SharedArrayBuffer holding one formatted ring (tests, host-owned rings). */
38
+ export function createRing(capacity) {
39
+ const sab = new SharedArrayBuffer(RING_HEADER_SIZE + capacity);
40
+ initRing(sab, 0, capacity);
41
+ return sab;
42
+ }
43
+ class RingView {
44
+ buffer;
45
+ words;
46
+ data;
47
+ view;
48
+ capacity;
49
+ constructor(buffer, byteOffset) {
50
+ this.buffer = buffer;
51
+ if (byteOffset % 64 !== 0)
52
+ throw new RingError("bad-header", "ring region is not 64-byte aligned");
53
+ if (buffer.byteLength < byteOffset + RING_HEADER_SIZE)
54
+ throw new RingError("bad-header", "ring region is too small");
55
+ this.words = new Int32Array(buffer, byteOffset, RING_HEADER_SIZE / 4);
56
+ const magic = Atomics.load(this.words, 0) >>> 0;
57
+ if (magic !== RING_MAGIC)
58
+ throw new RingError("bad-header", `bad ring magic 0x${magic.toString(16)}`);
59
+ const version = Atomics.load(this.words, 1);
60
+ if (version !== RING_VERSION)
61
+ throw new RingError("bad-header", `unsupported ring version ${version}`);
62
+ const capacity = Atomics.load(this.words, 2) >>> 0;
63
+ if (capacity < MIN_CAPACITY || capacity > MAX_CAPACITY || (capacity & (capacity - 1)) !== 0) {
64
+ throw new RingError("bad-header", `bad ring capacity ${capacity}`);
65
+ }
66
+ if (buffer.byteLength < byteOffset + RING_HEADER_SIZE + capacity)
67
+ throw new RingError("bad-header", "ring region is too small");
68
+ this.capacity = capacity;
69
+ this.data = new Uint8Array(buffer, byteOffset + RING_HEADER_SIZE, capacity);
70
+ this.view = new DataView(buffer, byteOffset + RING_HEADER_SIZE, capacity);
71
+ }
72
+ get maxMessageLen() {
73
+ return this.capacity / 2 - 4;
74
+ }
75
+ head() {
76
+ return Atomics.load(this.words, HEAD) >>> 0;
77
+ }
78
+ tail() {
79
+ return Atomics.load(this.words, TAIL) >>> 0;
80
+ }
81
+ off(pos) {
82
+ return pos & (this.capacity - 1);
83
+ }
84
+ }
85
+ /** Producer half. Only one producer may exist per ring. */
86
+ export class RingProducer {
87
+ #r;
88
+ #head;
89
+ /** The tail read by the last reload in #fit(); waitTarget() must wait on this value, not a fresh one. */
90
+ #seenTail = 0;
91
+ /** Attaches to a formatted ring at `byteOffset` (e.g. inside the engine's wasm memory). */
92
+ constructor(buffer, byteOffset = 0) {
93
+ this.#r = new RingView(buffer, byteOffset);
94
+ this.#head = this.#r.head();
95
+ this.#seenTail = this.#r.tail();
96
+ }
97
+ get maxMessageLen() {
98
+ return this.#r.maxMessageLen;
99
+ }
100
+ /**
101
+ * Room for a `len`-byte message: the skip to the start (0 if none), or -1 when full. Uses the
102
+ * cached tail while it shows enough room (tail only grows, so the cache can only under-report
103
+ * free space) and reloads it otherwise, or always when `fresh` (prepareWait).
104
+ */
105
+ #fit(len, fresh = false) {
106
+ const r = this.#r;
107
+ if (len > r.maxMessageLen)
108
+ throw new RingError("too-large", `message of ${len} bytes does not fit the ring`);
109
+ if (!fresh) {
110
+ const record = 4 + padded(len);
111
+ const toEnd = r.capacity - r.off(this.#head);
112
+ const skip = toEnd < record ? toEnd : 0;
113
+ if (skip + record <= r.capacity - ((this.#head - this.#seenTail) >>> 0))
114
+ return skip;
115
+ }
116
+ const tail = r.tail();
117
+ this.#seenTail = tail;
118
+ const used = (this.#head - tail) >>> 0;
119
+ if (used > r.capacity || tail % 4 !== 0)
120
+ throw new RingError("corrupt", "ring corrupted by peer");
121
+ const record = 4 + padded(len);
122
+ const toEnd = r.capacity - r.off(this.#head);
123
+ const skip = toEnd < record ? toEnd : 0;
124
+ return skip + record > r.capacity - used ? -1 : skip;
125
+ }
126
+ /** Pushes `msg`, waiting (without blocking the thread) while the ring is full. */
127
+ async pushAsync(msg, options = {}) {
128
+ while (!this.tryPush(msg))
129
+ await waitWritable(this, msg.length, options);
130
+ }
131
+ /** Pushes one message; false when the ring is full. Wakes a sleeping consumer. */
132
+ tryPush(msg) {
133
+ const skip = this.#fit(msg.length);
134
+ if (skip < 0)
135
+ return false;
136
+ const r = this.#r;
137
+ if (skip > 0)
138
+ r.view.setUint32(r.off(this.#head), PAD, true);
139
+ const start = (this.#head + skip) >>> 0;
140
+ r.data.set(msg, r.off(start) + 4);
141
+ r.view.setUint32(r.off(start), msg.length, true);
142
+ this.#head = (start + 4 + padded(msg.length)) >>> 0;
143
+ Atomics.store(r.words, HEAD, this.#head | 0);
144
+ // Plain load first: the exchange (a write to the flag line both sides use) only when set.
145
+ if (Atomics.load(r.words, CONSUMER_WAITING) !== 0 && Atomics.exchange(r.words, CONSUMER_WAITING, 0) !== 0) {
146
+ Atomics.notify(r.words, HEAD);
147
+ }
148
+ return true;
149
+ }
150
+ /** Announces that the producer will sleep until `len` bytes fit; false if they already do. */
151
+ prepareWait(len) {
152
+ Atomics.store(this.#r.words, PRODUCER_WAITING, 1);
153
+ if (this.#fit(len, true) >= 0) {
154
+ Atomics.store(this.#r.words, PRODUCER_WAITING, 0);
155
+ return false;
156
+ }
157
+ return true;
158
+ }
159
+ /**
160
+ * The word and value to wait on after a successful prepareWait: the tail that prepareWait saw
161
+ * the ring full at. Re-reading tail here would lose the wake-up when the consumer frees space
162
+ * in between (it clears producer_waiting and notifies before we sleep, then never again).
163
+ */
164
+ waitTarget() {
165
+ return [this.#r.words, TAIL, this.#seenTail | 0];
166
+ }
167
+ }
168
+ /** Consumer half. Only one consumer may exist per ring. */
169
+ export class RingConsumer {
170
+ #r;
171
+ #tail;
172
+ /** Last head read from shared memory; reloaded only when it shows the ring empty. */
173
+ #seenHead;
174
+ constructor(buffer, byteOffset = 0) {
175
+ this.#r = new RingView(buffer, byteOffset);
176
+ this.#tail = this.#r.tail();
177
+ this.#seenHead = this.#tail;
178
+ }
179
+ hasMessages() {
180
+ return this.#r.head() !== this.#tail;
181
+ }
182
+ /**
183
+ * The next message without copying, or null when empty. `bytes` views shared memory and is valid
184
+ * until `release()`, which consumes it and wakes a waiting producer (returns whether it did).
185
+ * Not releasing leaves the message in place: the next peek returns it again.
186
+ *
187
+ * head is cached and reloaded (and validated) only when the cached value shows the ring empty,
188
+ * so a producer that corrupts head is detected at that reload rather than on the very next peek.
189
+ * Records are validated either way, so a corrupt peer can never cause an out-of-bounds access.
190
+ */
191
+ peek() {
192
+ const r = this.#r;
193
+ const cap = r.capacity;
194
+ let tail = this.#tail;
195
+ let avail = (this.#seenHead - tail) >>> 0;
196
+ if (avail === 0) {
197
+ this.#seenHead = r.head();
198
+ avail = (this.#seenHead - tail) >>> 0;
199
+ if (avail === 0)
200
+ return null;
201
+ }
202
+ if (avail > cap || avail % 4 !== 0)
203
+ throw new RingError("corrupt", "ring corrupted by peer");
204
+ let len = r.view.getUint32(r.off(tail), true);
205
+ if (len === PAD) {
206
+ const skip = cap - r.off(tail);
207
+ if (skip >= avail)
208
+ throw new RingError("corrupt", "ring corrupted by peer");
209
+ tail = (tail + skip) >>> 0;
210
+ avail -= skip;
211
+ len = r.view.getUint32(r.off(tail), true);
212
+ }
213
+ if (len > cap / 2 - 4)
214
+ throw new RingError("corrupt", "ring corrupted by peer");
215
+ const record = 4 + padded(len);
216
+ if (record > avail || r.off(tail) + record > cap)
217
+ throw new RingError("corrupt", "ring corrupted by peer");
218
+ const start = r.off(tail) + 4;
219
+ const next = (tail + record) >>> 0;
220
+ const expected = this.#tail;
221
+ return {
222
+ bytes: r.data.subarray(start, start + len),
223
+ release: () => {
224
+ if (this.#tail !== expected)
225
+ throw new RingError("corrupt", "message released twice or out of order");
226
+ this.#tail = next;
227
+ Atomics.store(r.words, TAIL, next | 0);
228
+ // Plain load first: the exchange (a write to the flag line both sides use) only when set.
229
+ if (Atomics.load(r.words, PRODUCER_WAITING) === 0 || Atomics.exchange(r.words, PRODUCER_WAITING, 0) === 0) {
230
+ return false;
231
+ }
232
+ Atomics.notify(r.words, TAIL);
233
+ return true;
234
+ },
235
+ };
236
+ }
237
+ /** Pops (copies and releases) the next message, or null when empty. Wakes a waiting producer. */
238
+ tryPop() {
239
+ const m = this.peek();
240
+ if (!m)
241
+ return null;
242
+ const copy = m.bytes.slice();
243
+ m.release();
244
+ return copy;
245
+ }
246
+ /** Alias of `tryPop` (webpod_abi naming). */
247
+ pop() {
248
+ return this.tryPop();
249
+ }
250
+ /** Pops everything currently in the ring. */
251
+ drain(max = Infinity) {
252
+ const out = [];
253
+ for (let m = out.length < max ? this.tryPop() : null; m; m = out.length < max ? this.tryPop() : null)
254
+ out.push(m);
255
+ return out;
256
+ }
257
+ /** Announces that the consumer will sleep; false if messages arrived meanwhile. */
258
+ prepareWait() {
259
+ Atomics.store(this.#r.words, CONSUMER_WAITING, 1);
260
+ if (this.hasMessages()) {
261
+ Atomics.store(this.#r.words, CONSUMER_WAITING, 0);
262
+ return false;
263
+ }
264
+ return true;
265
+ }
266
+ waitTarget() {
267
+ return [this.#r.words, HEAD, this.#tail | 0];
268
+ }
269
+ }
270
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
271
+ /** Sleeps until the word changes from `value`, a notify, or the watchdog fires. Never blocks the thread. */
272
+ async function waitWord(words, index, value, options) {
273
+ const ms = options.watchdogMs ?? 50;
274
+ const waitAsync = Atomics.waitAsync;
275
+ const abort = options.signal
276
+ ? new Promise((r) => options.signal.addEventListener("abort", () => r(), { once: true }))
277
+ : undefined;
278
+ const timers = [sleep(ms)];
279
+ if (abort)
280
+ timers.push(abort);
281
+ if (typeof waitAsync === "function") {
282
+ const res = waitAsync(words, index, value, ms);
283
+ if (!res.async)
284
+ return;
285
+ await Promise.race([res.value, ...timers]);
286
+ return;
287
+ }
288
+ await Promise.race(timers);
289
+ }
290
+ /** Waits until the consumer has a message (or the watchdog fires; callers just re-check). */
291
+ export async function waitReadable(c, options = {}) {
292
+ if (!c.prepareWait())
293
+ return;
294
+ const [words, index, value] = c.waitTarget();
295
+ await waitWord(words, index, value, options);
296
+ }
297
+ /** Waits until `len` bytes may fit (or the watchdog fires). */
298
+ export async function waitWritable(p, len, options = {}) {
299
+ if (!p.prepareWait(len))
300
+ return;
301
+ const [words, index, value] = p.waitTarget();
302
+ await waitWord(words, index, value, options);
303
+ }
304
+ /** Names matching webpod_abi (`Ring::init` / `Ring::attach`), for engine-side code. */
305
+ export const Ring = {
306
+ init: initRing,
307
+ /** Validates an existing ring at `byteOffset` (never rewrites its header). */
308
+ attach(buffer, byteOffset = 0) {
309
+ const producer = () => new RingProducer(buffer, byteOffset);
310
+ const consumer = () => new RingConsumer(buffer, byteOffset);
311
+ producer(); // validates
312
+ return { producer, consumer };
313
+ },
314
+ };
315
+ export const waitForMessage = waitReadable;
316
+ export const waitForSpace = waitWritable;
317
+ //# sourceMappingURL=ring.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ring.js","sourceRoot":"","sources":["../src/ring.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,iGAAiG;AAEjG,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,SAAS;A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,CAAC,CAAC,UAAU,EAAE,CAAC;IAC7C,MAAM,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED,+DAA+D;AAC/D,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,CAAe,EAAE,GAAW,EAAE,UAAuB,EAAE;IACxF,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC;QAAE,OAAO;IAChC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;IAC7C,MAAM,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE,QAAQ;IACd,8EAA8E;IAC9E,MAAM,CAAC,MAAyB,EAAE,UAAU,GAAG,CAAC;QAC9C,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,IAAI,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,IAAI,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAC5D,QAAQ,EAAE,CAAC,CAAC,YAAY;QACxB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAChC,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "@webpodjs/abi",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "TypeScript implementation of the webpod engine <-> host ring ABI (docs/abi.md)",
5
+ "keywords": [
6
+ "webpod",
7
+ "ring-buffer",
8
+ "sharedarraybuffer",
9
+ "wasm"
10
+ ],
11
+ "license": "Apache-2.0",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/mirrorange/webpod.git",
15
+ "directory": "packages/abi"
16
+ },
17
+ "homepage": "https://github.com/mirrorange/webpod/tree/main/packages/abi#readme",
18
+ "bugs": "https://github.com/mirrorange/webpod/issues",
19
+ "type": "module",
20
+ "main": "dist/index.js",
21
+ "types": "dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "default": "./dist/index.js"
26
+ }
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "sideEffects": false,
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "scripts": {
36
+ "build": "tsc -p .",
37
+ "test": "node --test test/*.test.js"
38
+ }
39
+ }