@oasys/oecs 0.5.2 → 0.5.4
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/CHANGELOG.md +208 -14
- package/README.md +198 -145
- package/dist/core/ecs/access_check.d.cts +3 -3
- package/dist/core/ecs/access_check.d.ts +3 -3
- package/dist/core/ecs/archetype.d.cts +103 -43
- package/dist/core/ecs/archetype.d.ts +103 -43
- package/dist/core/ecs/archetype.d.ts.map +1 -1
- package/dist/core/ecs/archetype_graph.d.cts +8 -8
- package/dist/core/ecs/archetype_graph.d.ts +8 -8
- package/dist/core/ecs/archetype_graph.d.ts.map +1 -1
- package/dist/core/ecs/builtin_relations.d.cts +1 -1
- package/dist/core/ecs/builtin_relations.d.ts +1 -1
- package/dist/core/ecs/command_log.d.cts +4 -4
- package/dist/core/ecs/command_log.d.ts +4 -4
- package/dist/core/ecs/command_log.d.ts.map +1 -1
- package/dist/core/ecs/component.d.cts +4 -4
- package/dist/core/ecs/component.d.ts +4 -4
- package/dist/core/ecs/deferred_commands.d.cts +1 -1
- package/dist/core/ecs/deferred_commands.d.ts +1 -1
- package/dist/core/ecs/deferred_commands.d.ts.map +1 -1
- package/dist/core/ecs/ecs.d.cts +85 -43
- package/dist/core/ecs/ecs.d.ts +85 -43
- package/dist/core/ecs/ecs.d.ts.map +1 -1
- package/dist/core/ecs/ecs_memory.d.cts +15 -15
- package/dist/core/ecs/ecs_memory.d.ts +15 -15
- package/dist/core/ecs/ecs_memory.d.ts.map +1 -1
- package/dist/core/ecs/entity_allocator.d.cts +6 -6
- package/dist/core/ecs/entity_allocator.d.ts +6 -6
- package/dist/core/ecs/entity_allocator.d.ts.map +1 -1
- package/dist/core/ecs/event.d.cts +2 -2
- package/dist/core/ecs/event.d.ts +2 -2
- package/dist/core/ecs/event_registry.d.cts +1 -1
- package/dist/core/ecs/event_registry.d.ts +1 -1
- package/dist/core/ecs/event_registry.d.ts.map +1 -1
- package/dist/core/ecs/facades.d.cts +15 -15
- package/dist/core/ecs/facades.d.ts +15 -15
- package/dist/core/ecs/facades.d.ts.map +1 -1
- package/dist/core/ecs/frame_trace.d.cts +2 -2
- package/dist/core/ecs/frame_trace.d.ts +2 -2
- package/dist/core/ecs/host_commands.d.cts +12 -12
- package/dist/core/ecs/host_commands.d.ts +12 -12
- package/dist/core/ecs/host_commands.d.ts.map +1 -1
- package/dist/core/ecs/index.d.cts +1 -1
- package/dist/core/ecs/index.d.ts +1 -1
- package/dist/core/ecs/index.d.ts.map +1 -1
- package/dist/core/ecs/observer.d.cts +9 -9
- package/dist/core/ecs/observer.d.ts +9 -9
- package/dist/core/ecs/observer.d.ts.map +1 -1
- package/dist/core/ecs/query.d.cts +91 -70
- package/dist/core/ecs/query.d.ts +91 -70
- package/dist/core/ecs/query.d.ts.map +1 -1
- package/dist/core/ecs/ref.d.cts +53 -1
- package/dist/core/ecs/ref.d.ts +53 -1
- package/dist/core/ecs/ref.d.ts.map +1 -1
- package/dist/core/ecs/relation.d.cts +15 -15
- package/dist/core/ecs/relation.d.ts +15 -15
- package/dist/core/ecs/relation.d.ts.map +1 -1
- package/dist/core/ecs/relation_service.d.cts +14 -14
- package/dist/core/ecs/relation_service.d.ts +14 -14
- package/dist/core/ecs/relation_service.d.ts.map +1 -1
- package/dist/core/ecs/resource.d.cts +1 -1
- package/dist/core/ecs/resource.d.ts +1 -1
- package/dist/core/ecs/resource_registry.d.cts +2 -2
- package/dist/core/ecs/resource_registry.d.ts +2 -2
- package/dist/core/ecs/resume.d.cts +3 -3
- package/dist/core/ecs/resume.d.ts +3 -3
- package/dist/core/ecs/resume.d.ts.map +1 -1
- package/dist/core/ecs/schedule.d.cts +22 -9
- package/dist/core/ecs/schedule.d.ts +22 -9
- package/dist/core/ecs/schedule.d.ts.map +1 -1
- package/dist/core/ecs/snapshot_service.d.cts +3 -3
- package/dist/core/ecs/snapshot_service.d.ts +3 -3
- package/dist/core/ecs/sparse_store.d.cts +6 -6
- package/dist/core/ecs/sparse_store.d.ts +6 -6
- package/dist/core/ecs/sparse_store.d.ts.map +1 -1
- package/dist/core/ecs/store.d.cts +189 -110
- package/dist/core/ecs/store.d.ts +189 -110
- package/dist/core/ecs/store.d.ts.map +1 -1
- package/dist/core/ecs/store_layout_listener.d.cts +2 -2
- package/dist/core/ecs/store_layout_listener.d.ts +2 -2
- package/dist/core/ecs/system.d.cts +8 -8
- package/dist/core/ecs/system.d.ts +8 -8
- package/dist/core/ecs/system.d.ts.map +1 -1
- package/dist/core/ecs/utils/error.d.cts +7 -0
- package/dist/core/ecs/utils/error.d.ts +7 -0
- package/dist/core/ecs/utils/error.d.ts.map +1 -1
- package/dist/core/store/action_ring.d.cts +7 -8
- package/dist/core/store/action_ring.d.ts +7 -8
- package/dist/core/store/action_ring.d.ts.map +1 -1
- package/dist/core/store/allocator.d.cts +58 -35
- package/dist/core/store/allocator.d.ts +58 -35
- package/dist/core/store/allocator.d.ts.map +1 -1
- package/dist/core/store/buffer_backed_column.d.cts +5 -6
- package/dist/core/store/buffer_backed_column.d.ts +5 -6
- package/dist/core/store/buffer_backed_column.d.ts.map +1 -1
- package/dist/core/store/column_store.d.cts +23 -23
- package/dist/core/store/column_store.d.ts +23 -23
- package/dist/core/store/column_store.d.ts.map +1 -1
- package/dist/core/store/command_dispatch.d.cts +1 -1
- package/dist/core/store/command_dispatch.d.ts +1 -1
- package/dist/core/store/command_ring.d.cts +6 -7
- package/dist/core/store/command_ring.d.ts +6 -7
- package/dist/core/store/command_ring.d.ts.map +1 -1
- package/dist/core/store/descriptor.d.cts +2 -2
- package/dist/core/store/descriptor.d.ts +2 -2
- package/dist/core/store/entity_index.d.cts +3 -3
- package/dist/core/store/entity_index.d.ts +3 -3
- package/dist/core/store/event_ring.d.cts +7 -7
- package/dist/core/store/event_ring.d.ts +7 -7
- package/dist/core/store/extend.d.cts +2 -2
- package/dist/core/store/extend.d.ts +2 -2
- package/dist/core/store/extend.d.ts.map +1 -1
- package/dist/core/store/grow.d.cts +1 -1
- package/dist/core/store/grow.d.ts +1 -1
- package/dist/core/store/grow.d.ts.map +1 -1
- package/dist/core/store/header.d.cts +9 -9
- package/dist/core/store/header.d.ts +9 -9
- package/dist/core/store/header.d.ts.map +1 -1
- package/dist/core/store/layout_ops.d.cts +25 -7
- package/dist/core/store/layout_ops.d.ts +25 -7
- package/dist/core/store/layout_ops.d.ts.map +1 -1
- package/dist/core/store/state_hash.d.cts +3 -3
- package/dist/core/store/state_hash.d.ts +3 -3
- package/dist/extensions/editor/editor.d.cts +4 -4
- package/dist/extensions/editor/editor.d.ts +4 -4
- package/dist/extensions/editor/editor.d.ts.map +1 -1
- package/dist/extensions/editor/field_handle.d.cts +1 -1
- package/dist/extensions/editor/field_handle.d.ts +1 -1
- package/dist/extensions/editor/index.d.cts +2 -2
- package/dist/extensions/editor/index.d.ts +2 -2
- package/dist/extensions/editor/index.development.js +4 -4
- package/dist/extensions/editor/index.js +4 -4
- package/dist/extensions/reactive/ecs_sync.d.cts +4 -4
- package/dist/extensions/reactive/ecs_sync.d.ts +4 -4
- package/dist/extensions/reactive/index.d.cts +4 -4
- package/dist/extensions/reactive/index.d.ts +4 -4
- package/dist/extensions/reactive/index.development.js +3 -3
- package/dist/extensions/reactive/index.js +3 -3
- package/dist/extensions/solid/index.d.cts +1 -1
- package/dist/extensions/solid/index.d.ts +1 -1
- package/dist/extensions/solid/index.development.js +1 -1
- package/dist/extensions/solid/index.js +1 -1
- package/dist/extensions/solid/kernel_solid.d.cts +1 -1
- package/dist/extensions/solid/kernel_solid.d.ts +1 -1
- package/dist/extensions/solid/kernel_solid.d.ts.map +1 -1
- package/dist/{host_commands-BI8pEmjH.js → host_commands-BlR3oZ3x.js} +473 -393
- package/dist/host_commands-C2cpU3yC.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.development.cjs +1 -1
- package/dist/index.development.js +3345 -2963
- package/dist/index.js +1496 -1131
- package/dist/{internal-BMDgWZbt.js → internal-BoxWl4dG.js} +410 -330
- package/dist/internal-CGBEwfeB.cjs +2 -0
- package/dist/internal.cjs +1 -1
- package/dist/internal.development.cjs +1 -1
- package/dist/internal.development.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/primitives.development.js +1 -1
- package/dist/primitives.js +1 -1
- package/dist/reactive/index.d.cts +2 -2
- package/dist/reactive/index.d.ts +2 -2
- package/dist/reactive/index.development.js +1 -1
- package/dist/reactive/index.js +1 -1
- package/dist/reactive/kernel.d.cts +5 -5
- package/dist/reactive/kernel.d.ts +5 -5
- package/dist/reactive/shallow.d.cts +1 -1
- package/dist/reactive/shallow.d.ts +1 -1
- package/dist/{shallow-DfnAm9vG.js → shallow-Bs39EPh1.js} +1 -1
- package/dist/{shallow-9S1pY_Iw.js → shallow-CiFC70Dz.js} +1 -1
- package/dist/{shared-BU1Cd40h.js → shared-B4v0L1cw.js} +41 -35
- package/dist/shared-DU78k0pU.cjs +1 -0
- package/dist/shared.cjs +1 -1
- package/dist/shared.d.cts +1 -1
- package/dist/shared.d.ts +1 -1
- package/dist/shared.development.cjs +1 -1
- package/dist/shared.development.js +1 -1
- package/dist/shared.js +1 -1
- package/dist/type_primitives/typed_arrays/typed_arrays.d.cts +2 -2
- package/dist/type_primitives/typed_arrays/typed_arrays.d.ts +2 -2
- package/dist/{typed_arrays-BcXcnzB4.js → typed_arrays-DIVwVy5_.js} +1 -1
- package/dist/version.d.cts +2 -2
- package/dist/version.d.ts +2 -2
- package/package.json +1 -1
- package/dist/host_commands-CxhpzMx9.cjs +0 -1
- package/dist/internal-LiTSB_tG.cjs +0 -2
- package/dist/shared-BymrGTyR.cjs +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* BufferAllocator — pluggable buffer source for the SAB layer
|
|
2
|
+
* BufferAllocator — pluggable buffer source for the SAB layer.
|
|
3
3
|
*
|
|
4
4
|
* The engine has historically allocated its SAB as a fresh
|
|
5
5
|
* `new SharedArrayBuffer(totalBytes)` inside `createColumnStore`.
|
|
6
|
-
*
|
|
7
|
-
* `WebAssembly.Memory.buffer` so the
|
|
6
|
+
* A WASM backend needs the SAB to optionally be backed by a
|
|
7
|
+
* `WebAssembly.Memory.buffer` instead, so the sim can read and write the live
|
|
8
8
|
* ECS columns through its own memory handle. This module abstracts the
|
|
9
9
|
* "where does the buffer come from" decision behind a single function
|
|
10
10
|
* type.
|
|
@@ -58,15 +58,16 @@ export interface BufferAllocator {
|
|
|
58
58
|
/** Returns a buffer of byteLength >= `bytes`. The historical name is
|
|
59
59
|
* "SAB", but the return is `ArrayBufferLike`: `growableSabAllocator` /
|
|
60
60
|
* `wasmMemoryAllocator` produce a `SharedArrayBuffer` (the SAB profile),
|
|
61
|
-
* while `heapArraybufferAllocator` produces a plain resizable
|
|
62
|
-
* `ArrayBuffer` (the pure-TS heap profile — no
|
|
63
|
-
* required). The store layer treats the backing
|
|
64
|
-
* WASM/worker boundary narrows back to
|
|
61
|
+
* while `heapArraybufferAllocator` produces a plain fixed (non-resizable)
|
|
62
|
+
* `ArrayBuffer` reserved at the cap (the pure-TS heap profile — no
|
|
63
|
+
* cross-origin isolation required). The store layer treats the backing
|
|
64
|
+
* uniformly; only the WASM/worker boundary narrows back to
|
|
65
|
+
* `SharedArrayBuffer`. */
|
|
65
66
|
(bytes: number): ArrayBufferLike;
|
|
66
67
|
readonly isInPlace?: boolean;
|
|
67
68
|
}
|
|
68
69
|
/**
|
|
69
|
-
* The only allocator shape a **live `Store`** accepts
|
|
70
|
+
* The only allocator shape a **live `Store`** accepts. The engine makes
|
|
70
71
|
* "a live Store is backed by an in-place allocator" a correctness invariant —
|
|
71
72
|
* the flush loops hoist entity-index views across grows. This brand moves
|
|
72
73
|
* that invariant from runtime convention to the type/construction boundary:
|
|
@@ -74,19 +75,21 @@ export interface BufferAllocator {
|
|
|
74
75
|
* return it; `DEFAULT_SAB_ALLOCATOR` keeps the wide `BufferAllocator` type and
|
|
75
76
|
* therefore cannot typecheck where a live-Store backing is required. Non-in-place
|
|
76
77
|
* allocators remain valid for snapshot/test sizing only. The brand says nothing
|
|
77
|
-
* about *shared* vs *heap* backing — `heapArraybufferAllocator`'s
|
|
78
|
-
* `ArrayBuffer` is just as in-place as a growable SAB
|
|
79
|
-
*
|
|
78
|
+
* about *shared* vs *heap* backing — `heapArraybufferAllocator`'s fixed
|
|
79
|
+
* `ArrayBuffer` is just as in-place as a growable SAB: it is reserved at the full
|
|
80
|
+
* cap up front and never moves, so grow/extend relocate columns *within* it
|
|
81
|
+
* (`copyWithin`) rather than resizing the buffer — existing views stay valid, the
|
|
82
|
+
* same guarantee `SharedArrayBuffer.prototype.grow` gives by resizing in place.
|
|
80
83
|
*/
|
|
81
84
|
export type InPlaceBufferAllocator = BufferAllocator & {
|
|
82
85
|
readonly isInPlace: true;
|
|
83
86
|
};
|
|
84
87
|
/**
|
|
85
88
|
* Thrown when an allocator cannot satisfy a request because its by-design
|
|
86
|
-
* byte ceiling is reached (
|
|
89
|
+
* byte ceiling is reached (the cap is a runaway-growth signal, not a
|
|
87
90
|
* limit to paper over — there is deliberately no grow-beyond-cap fallback).
|
|
88
91
|
* Typed so `Store`'s grow handler can recognise the cap case and re-throw
|
|
89
|
-
* with the caller's declared sizing intent attached
|
|
92
|
+
* with the caller's declared sizing intent attached without ever
|
|
90
93
|
* catching-to-recover.
|
|
91
94
|
*/
|
|
92
95
|
export declare class StoreCapExceededError extends Error {
|
|
@@ -130,16 +133,16 @@ export declare const DEFAULT_SAB_ALLOCATOR: BufferAllocator;
|
|
|
130
133
|
* in place rather than relocating).
|
|
131
134
|
*
|
|
132
135
|
* Sizing: `maxBytes` is committed *virtual* memory, not resident RAM —
|
|
133
|
-
* physical pages fault in lazily as the SAB actually grows.
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
136
|
+
* physical pages fault in lazily as the SAB actually grows. A larger cap costs
|
|
137
|
+
* more time per allocation than a smaller one, because V8 does per-byte
|
|
138
|
+
* bookkeeping when it constructs the buffer. The cost increases with the cap, so
|
|
139
|
+
* a 1 GiB cap is the slowest of the sizes we measured and a 1 MiB cap the
|
|
140
|
+
* quickest. A caller with a bigger world can pass a larger cap; a caller that
|
|
141
|
+
* stays under the 256 MiB default keeps the quicker Store construction.
|
|
139
142
|
*
|
|
140
143
|
* THE 256 MiB DEFAULT IS A HARD DESIGN CEILING, NOT A SOFT TARGET — and
|
|
141
144
|
* exceeding it is INTENDED to be fatal. There is deliberately no
|
|
142
|
-
* grow-beyond-cap fallback or compaction pass (see
|
|
145
|
+
* grow-beyond-cap fallback or compaction pass (see the loud
|
|
143
146
|
* note at the `bytes > maxBytes` throw below). If you are here because
|
|
144
147
|
* a workload died at the cap and you are tempted to add a fresh-allocator
|
|
145
148
|
* realloc fallback: don't, unless the numbers below have changed. They
|
|
@@ -166,31 +169,51 @@ export declare const DEFAULT_SAB_ALLOCATOR: BufferAllocator;
|
|
|
166
169
|
* therefore signals a real defect upstream (runaway entity creation), not
|
|
167
170
|
* a sizing shortfall to paper over.
|
|
168
171
|
*
|
|
169
|
-
* Cited verification
|
|
172
|
+
* Cited verification: a Bun runtime check
|
|
170
173
|
* confirms `new Int32Array(buffer, off, len)` retains identical byteOffset,
|
|
171
174
|
* length, and stored values after `.grow()`; DataView byteLength
|
|
172
175
|
* auto-tracks the grown buffer.
|
|
173
176
|
*
|
|
174
177
|
* Used by the `extendColumnStore` fast path during lazy archetype
|
|
175
|
-
* registration
|
|
178
|
+
* registration — keeps existing column views valid so
|
|
176
179
|
* `refreshViews` is a no-op for old archetypes.
|
|
177
180
|
*/
|
|
178
181
|
export declare function growableSabAllocator(maxBytes?: number): InPlaceBufferAllocator;
|
|
179
182
|
/**
|
|
180
|
-
* Allocator that backs the store by a single
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
183
|
+
* Allocator that backs the store by a single **fixed (non-resizable) plain
|
|
184
|
+
* `ArrayBuffer`** reserved at the full `maxBytes` cap up front. This is the
|
|
185
|
+
* pure-TS **heap profile** — the oecs default: no `SharedArrayBuffer`,
|
|
186
|
+
* hence no cross-origin isolation
|
|
184
187
|
* (COOP/COEP) requirement, and no worker/WASM transfer (single-process worlds
|
|
185
|
-
* only).
|
|
188
|
+
* only).
|
|
186
189
|
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
190
|
+
* WHY FIXED, NOT RESIZABLE (the 0.5.3 iteration-perf fix): V8 has no fast
|
|
191
|
+
* element-access path for TypedArray views over a **resizable or growable**
|
|
192
|
+
* `ArrayBuffer`, because each `col[i]` reads the mutable length again. Thus a
|
|
193
|
+
* loop over a column is much slower than the same loop over a fixed buffer.
|
|
194
|
+
* Version 0.3.x gave each column its own fixed buffer. The change in 0.5.0 to
|
|
195
|
+
* one resizable arena made every iteration-bound system slower, and it gave no
|
|
196
|
+
* signal. A fixed buffer restores the fast path.
|
|
197
|
+
*
|
|
198
|
+
* How growth still works in place: the cap is reserved as one fixed buffer at
|
|
199
|
+
* construction. A resizable buffer was originally chosen so `.resize()` could
|
|
200
|
+
* grow in place without moving views; a fixed buffer never moves EITHER — the
|
|
201
|
+
* store's grow/extend relocate columns to the tail *within* this buffer
|
|
202
|
+
* (`copyWithin`), so the buffer object and every existing view stay valid.
|
|
203
|
+
* `isInPlace: true` therefore still holds, and the
|
|
204
|
+
* entity-index-hoist-across-grow invariant is preserved. The store keys its
|
|
205
|
+
* tail cursor off the header `capacity` (the logical high-water), NOT
|
|
206
|
+
* `buffer.byteLength` — which is now always `maxBytes` (the same decoupling the
|
|
207
|
+
* wasm page-rounded allocator already relied on).
|
|
208
|
+
*
|
|
209
|
+
* - Memory cost is unchanged: a fixed `ArrayBuffer(maxBytes)` faults pages in
|
|
210
|
+
* lazily (untouched pages cost no RSS), exactly like the resizable buffer's
|
|
211
|
+
* `maxByteLength` reservation — a 256 MiB reservation on a 1000-entity world
|
|
212
|
+
* stays a few MiB resident (measured ~4 MiB RSS, within ~1 MiB of the old
|
|
213
|
+
* resizable buffer).
|
|
214
|
+
* - same 256 MiB default cap with hard-ceiling semantics: a request
|
|
215
|
+
* past `maxBytes` throws `StoreCapExceededError` — runaway growth signal,
|
|
216
|
+
* not a limit to route around.
|
|
194
217
|
*
|
|
195
218
|
* Why a non-shared buffer suffices: `Atomics` live only on the cross-thread
|
|
196
219
|
* command/event/action rings, never on the core store path, so a single-process
|
|
@@ -203,7 +226,7 @@ export declare function heapArraybufferAllocator(maxBytes?: number): InPlaceBuff
|
|
|
203
226
|
* live SAB *be* a WASM module's `WebAssembly.Memory`. Grows the memory in
|
|
204
227
|
* 64 KiB page increments when `bytes` exceeds the current buffer.
|
|
205
228
|
*
|
|
206
|
-
* This is the **opt-in storage backing for the WASM path
|
|
229
|
+
* This is the **opt-in storage backing for the WASM path**. A consumer
|
|
207
230
|
* that attaches a WASM `ComputeBackend` passes
|
|
208
231
|
* `bufferAllocator: wasmMemoryAllocator(memory)` so the Zig systems read/write
|
|
209
232
|
* the same bytes the host's columns live in — zero-copy across the FFI boundary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocator.d.ts","sourceRoot":"","sources":["../../../src/core/store/allocator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,eAAe;IAC/B
|
|
1
|
+
{"version":3,"file":"allocator.d.ts","sourceRoot":"","sources":["../../../src/core/store/allocator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;;;;8BAO0B;IAC1B,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAAC;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAA;CAAE,CAAC;AAEpF;;;;;;;GAOG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;aAG9B,cAAc,EAAE,MAAM;IACtC;6DACyD;aACzC,QAAQ,EAAE,MAAM,GAAG,IAAI;gBAJvC,OAAO,EAAE,MAAM,EACC,cAAc,EAAE,MAAM;IACtC;6DACyD;IACzC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvC,OAAO,CAAC,EAAE,YAAY;CAKvB;AAED;;;;;;oEAMoE;AACpE,qBAAa,mBAAoB,SAAQ,KAAK;;CAe7C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,eAGnC,CAAC;AAgEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,GAAE,MAA0B,GAAG,sBAAsB,CA6BjG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,wBAAwB,CACvC,QAAQ,GAAE,MAA0B,GAClC,sBAAsB,CAsBxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,sBAAsB,CA4DtF"}
|
|
@@ -23,8 +23,8 @@ export declare class BufferBackedColumn<T extends AnyTypedArray> implements Colu
|
|
|
23
23
|
* `newView` already (`growColumnStore` does this). The logical length is
|
|
24
24
|
* preserved across the swap; capacity becomes `newView.length`.
|
|
25
25
|
*
|
|
26
|
-
* Used to honour the `view_stamp` invariant after a host-side SAB realloc
|
|
27
|
-
*
|
|
26
|
+
* Used to honour the `view_stamp` invariant after a host-side SAB realloc:
|
|
27
|
+
* every cached column view must be rebuilt before
|
|
28
28
|
* the next read/write. */
|
|
29
29
|
refreshView(newView: T): void;
|
|
30
30
|
get length(): number;
|
|
@@ -39,15 +39,14 @@ export declare class BufferBackedColumn<T extends AnyTypedArray> implements Colu
|
|
|
39
39
|
clear(): void;
|
|
40
40
|
/** Set the logical length directly, declaring that `[0, len)` of the backing
|
|
41
41
|
* SAB view already holds valid data. The snapshot-mount path
|
|
42
|
-
* (`Archetype.restoreHostRows
|
|
42
|
+
* (`Archetype.restoreHostRows`) uses this to re-sync the column's
|
|
43
43
|
* logical length with the restored `Archetype.length` — the bytes come from
|
|
44
44
|
* the restored SAB, but `_len` is host state. Throws on overrun (cannot grow
|
|
45
45
|
* a fixed SAB view here — the mount already adopted the restored capacity). */
|
|
46
46
|
setLength(len: number): void;
|
|
47
47
|
/** Raw backing view. Stable for the lifetime of the SAB; views over a
|
|
48
48
|
* SAB do not invalidate the way a `GrowableTypedArray`'s `buf` does
|
|
49
|
-
* after a grow. (`view_stamp`
|
|
50
|
-
* once #171 §6.1.4 lands.) */
|
|
49
|
+
* after a grow. (`view_stamp` signals "underlying SAB swapped".) */
|
|
51
50
|
get buf(): T;
|
|
52
51
|
/** Zero-copy subarray of valid data (`0..length-1`). */
|
|
53
52
|
view(): T;
|
|
@@ -55,7 +54,7 @@ export declare class BufferBackedColumn<T extends AnyTypedArray> implements Colu
|
|
|
55
54
|
/** Throw if the backing view cannot hold `capacity` elements. Mirrors
|
|
56
55
|
* `GrowableTypedArray.ensureCapacity` but cannot allocate — a SAB
|
|
57
56
|
* grow requires republishing the underlying buffer and rebuilding views
|
|
58
|
-
* across every archetype, which is the
|
|
57
|
+
* across every archetype, which is the republish invariant. */
|
|
59
58
|
ensureCapacity(capacity: number): void;
|
|
60
59
|
/** Append `count` elements from `src[srcOffset..srcOffset+count]`.
|
|
61
60
|
* Throws on overrun. */
|
|
@@ -23,8 +23,8 @@ export declare class BufferBackedColumn<T extends AnyTypedArray> implements Colu
|
|
|
23
23
|
* `newView` already (`growColumnStore` does this). The logical length is
|
|
24
24
|
* preserved across the swap; capacity becomes `newView.length`.
|
|
25
25
|
*
|
|
26
|
-
* Used to honour the `view_stamp` invariant after a host-side SAB realloc
|
|
27
|
-
*
|
|
26
|
+
* Used to honour the `view_stamp` invariant after a host-side SAB realloc:
|
|
27
|
+
* every cached column view must be rebuilt before
|
|
28
28
|
* the next read/write. */
|
|
29
29
|
refreshView(newView: T): void;
|
|
30
30
|
get length(): number;
|
|
@@ -39,15 +39,14 @@ export declare class BufferBackedColumn<T extends AnyTypedArray> implements Colu
|
|
|
39
39
|
clear(): void;
|
|
40
40
|
/** Set the logical length directly, declaring that `[0, len)` of the backing
|
|
41
41
|
* SAB view already holds valid data. The snapshot-mount path
|
|
42
|
-
* (`Archetype.restoreHostRows
|
|
42
|
+
* (`Archetype.restoreHostRows`) uses this to re-sync the column's
|
|
43
43
|
* logical length with the restored `Archetype.length` — the bytes come from
|
|
44
44
|
* the restored SAB, but `_len` is host state. Throws on overrun (cannot grow
|
|
45
45
|
* a fixed SAB view here — the mount already adopted the restored capacity). */
|
|
46
46
|
setLength(len: number): void;
|
|
47
47
|
/** Raw backing view. Stable for the lifetime of the SAB; views over a
|
|
48
48
|
* SAB do not invalidate the way a `GrowableTypedArray`'s `buf` does
|
|
49
|
-
* after a grow. (`view_stamp`
|
|
50
|
-
* once #171 §6.1.4 lands.) */
|
|
49
|
+
* after a grow. (`view_stamp` signals "underlying SAB swapped".) */
|
|
51
50
|
get buf(): T;
|
|
52
51
|
/** Zero-copy subarray of valid data (`0..length-1`). */
|
|
53
52
|
view(): T;
|
|
@@ -55,7 +54,7 @@ export declare class BufferBackedColumn<T extends AnyTypedArray> implements Colu
|
|
|
55
54
|
/** Throw if the backing view cannot hold `capacity` elements. Mirrors
|
|
56
55
|
* `GrowableTypedArray.ensureCapacity` but cannot allocate — a SAB
|
|
57
56
|
* grow requires republishing the underlying buffer and rebuilding views
|
|
58
|
-
* across every archetype, which is the
|
|
57
|
+
* across every archetype, which is the republish invariant. */
|
|
59
58
|
ensureCapacity(capacity: number): void;
|
|
60
59
|
/** Append `count` elements from `src[srcOffset..srcOffset+count]`.
|
|
61
60
|
* Throws on overrun. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer_backed_column.d.ts","sourceRoot":"","sources":["../../../src/core/store/buffer_backed_column.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;6EAG6E;AAC7E,qBAAa,wBAAyB,SAAQ,KAAK;IAClD,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,SAAS,EAAE,MAAM,CAAC;gBAEtB,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAM/C;AAED,qBAAa,kBAAkB,CAAC,CAAC,SAAS,aAAa,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IACnF,OAAO,CAAC,IAAI,CAAI;IAChB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,IAAI,CAAK;IAEjB;;;0EAGsE;gBAC1D,IAAI,EAAE,CAAC;IAKnB;;;;;;;8BAO0B;IACnB,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI;IAQpC,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAEM,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAOzB,GAAG,IAAI,MAAM;IAIb,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAItB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAI5C;gFAC4E;IACrE,UAAU,CAAC,CAAC,EAAE,M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C,GAAG,EAAE,MAAM,GAAG,IAAI;IAOnC;;wEAEoE;IACpE,IAAW,GAAG,IAAI,CAAC,CAElB;IAED,wDAAwD;IACjD,IAAI,IAAI,CAAC;IAQhB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC;IAYrC;;;mEAG+D;IACxD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAM7C;4BACwB;IACjB,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAQjE,gDAAgD;IACzC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM5C;gEAC4D;IACrD,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAK1D"}
|
|
@@ -51,7 +51,7 @@ export interface ArchetypeViews {
|
|
|
51
51
|
}
|
|
52
52
|
export interface ColumnStore {
|
|
53
53
|
/** The backing buffer. `ArrayBufferLike` because the store is backing-agnostic:
|
|
54
|
-
* a `SharedArrayBuffer` for the SAB/WASM/worker profile, or a plain
|
|
54
|
+
* a `SharedArrayBuffer` for the SAB/WASM/worker profile, or a plain fixed
|
|
55
55
|
* `ArrayBuffer` for the pure-TS heap profile (`heapArraybufferAllocator`).
|
|
56
56
|
* Consumers that genuinely require sharing (worker transfer, WASM memory)
|
|
57
57
|
* narrow back to `SharedArrayBuffer` at their boundary. */
|
|
@@ -88,12 +88,12 @@ export declare function columnKey(componentId: number, fieldId: number): number;
|
|
|
88
88
|
* real matches three orders of magnitude below this, but the cap is tunable
|
|
89
89
|
* and callers are invited to raise it for bigger worlds — so the layout step
|
|
90
90
|
* guards the hard 2³¹ ceiling explicitly rather than relying on the policy
|
|
91
|
-
* cap to stay in front of it
|
|
91
|
+
* cap to stay in front of it. */
|
|
92
92
|
export declare const STORE_MAX_BYTE_OFFSET: number;
|
|
93
93
|
/** Thrown when a SAB column layout would place an offset at or beyond
|
|
94
94
|
* {@link STORE_MAX_BYTE_OFFSET} (2³¹), past which the signed-32-bit bitwise
|
|
95
95
|
* `alignUp` can no longer produce correct offsets. This is a hard ceiling,
|
|
96
|
-
* not the (tunable, much lower) 256 MiB allocator cap
|
|
96
|
+
* not the (tunable, much lower) 256 MiB allocator cap. */
|
|
97
97
|
export declare class StoreLayoutOverflowError extends Error {
|
|
98
98
|
constructor(byteOff: number);
|
|
99
99
|
}
|
|
@@ -102,7 +102,7 @@ export declare class StoreLayoutOverflowError extends Error {
|
|
|
102
102
|
*
|
|
103
103
|
* Throws {@link StoreLayoutOverflowError} when the rounded offset would reach
|
|
104
104
|
* {@link STORE_MAX_BYTE_OFFSET}, because the `& ~(align-1)` step coerces to a
|
|
105
|
-
* signed 32-bit int and wraps past 2
|
|
105
|
+
* signed 32-bit int and wraps past 2³¹. The guard fires before the
|
|
106
106
|
* bitwise op so any returned offset is always a correct, in-range value.
|
|
107
107
|
* Shared by `extend.ts` and `grow.ts`, whose in-place paths compute tail
|
|
108
108
|
* byte_offs without going through `planLayout`. */
|
|
@@ -114,12 +114,12 @@ export declare function alignUp(off: number, align: number): number;
|
|
|
114
114
|
* `headroomBytes` reserves slack at the end of the descriptor region — ON
|
|
115
115
|
* TOP OF the natural size for `specs` — so future extends can append new
|
|
116
116
|
* descriptor entries without shifting existing column byte_offs. Used by
|
|
117
|
-
* the growable-SAB path
|
|
117
|
+
* the growable-SAB path — column views stay valid across
|
|
118
118
|
* `extendColumnStore` because their byte_offs don't move.
|
|
119
119
|
*
|
|
120
|
-
* Additive, not a floor
|
|
120
|
+
* Additive, not a floor: `regionSize = natural + headroom`, NOT
|
|
121
121
|
* `max(natural, headroom)`. A floor only yields slack while `natural` is
|
|
122
|
-
* below it; the moment the descriptor region outgrows the floor (the
|
|
122
|
+
* below it; the moment the descriptor region outgrows the floor (the
|
|
123
123
|
* headroom exhausts and a realloc re-plans the merged spec set), a floor
|
|
124
124
|
* would size the region to exactly `natural` — zero slack — and every
|
|
125
125
|
* subsequent extend would take the slow realloc path forever after. The
|
|
@@ -138,11 +138,11 @@ export { planLayout };
|
|
|
138
138
|
/** Optional configuration for `createColumnStore`. */
|
|
139
139
|
export interface CreateColumnStoreOptions {
|
|
140
140
|
/** Extra slack to reserve at the end of the layout descriptor region,
|
|
141
|
-
* ON TOP OF the natural size for `specs` (
|
|
141
|
+
* ON TOP OF the natural size for `specs` (additive, not a floor).
|
|
142
142
|
* The descriptor region is padded with this many unused bytes so future
|
|
143
143
|
* `extendColumnStore` calls can append new archetype descriptors into the
|
|
144
144
|
* slack without shifting existing column byte_offs. Pairs with
|
|
145
|
-
* `growableSabAllocator` to give the
|
|
145
|
+
* `growableSabAllocator` to give the in-place fast path: existing
|
|
146
146
|
* TypedArray column views stay valid across extends because their offsets
|
|
147
147
|
* and the underlying buffer both stay put.
|
|
148
148
|
*
|
|
@@ -150,9 +150,9 @@ export interface CreateColumnStoreOptions {
|
|
|
150
150
|
* value lives on `ColumnStoreInternal._reservedDescriptorBytes` and
|
|
151
151
|
* `optionsFromOld` re-applies it, so a store that exhausts its headroom
|
|
152
152
|
* and reallocs gets a fresh margin rather than dropping to zero slack and
|
|
153
|
-
* going permanently slow
|
|
153
|
+
* going permanently slow. */
|
|
154
154
|
readonly reservedDescriptorBytes?: number;
|
|
155
|
-
/** When provided, allocates a command ring
|
|
155
|
+
/** When provided, allocates a command ring inside
|
|
156
156
|
* the SAB at a stable offset right after the 48-byte header. Slot
|
|
157
157
|
* count MUST be a power of two; `COMMAND_RING_DEFAULT_CAPACITY_SLOTS`
|
|
158
158
|
* (256) is the canonical value. Omitted ⇒ no ring; `command_ring_off`
|
|
@@ -164,8 +164,8 @@ export interface CreateColumnStoreOptions {
|
|
|
164
164
|
* `growColumnStore` calls, since those grow the descriptor region and
|
|
165
165
|
* the column tail but never the bytes between header and descriptor. */
|
|
166
166
|
readonly commandRingCapacitySlots?: number;
|
|
167
|
-
/** When provided, allocates the entity-index region
|
|
168
|
-
*
|
|
167
|
+
/** When provided, allocates the entity-index region inside the SAB at a
|
|
168
|
+
* stable offset between the command ring
|
|
169
169
|
* (or header) and the descriptor region. Holds `(generations,
|
|
170
170
|
* archetypes, rows)` triples indexed by entity slot; the engine's
|
|
171
171
|
* `Store` populates them as entities are created/moved/destroyed,
|
|
@@ -176,7 +176,7 @@ export interface CreateColumnStoreOptions {
|
|
|
176
176
|
* `ENTITY_INDEX_DEFAULT_CAPACITY`; bare-SAB tests can leave it
|
|
177
177
|
* absent. */
|
|
178
178
|
readonly entityIndexCapacity?: number;
|
|
179
|
-
/** When provided, allocates the event ring
|
|
179
|
+
/** When provided, allocates the event ring
|
|
180
180
|
* inside the SAB at a stable offset between the entity-index region
|
|
181
181
|
* and the descriptor region. Same SPSC shape as the command ring;
|
|
182
182
|
* carries ECS signal payloads so Zig systems can emit and consume
|
|
@@ -185,9 +185,9 @@ export interface CreateColumnStoreOptions {
|
|
|
185
185
|
* Slot count MUST be a power of two; `EVENT_RING_DEFAULT_CAPACITY_SLOTS`
|
|
186
186
|
* (256) is the canonical value. Omitted ⇒ no ring; `event_ring_off`
|
|
187
187
|
* stays at 0 ("absent"); existing test fixtures with hand-rolled
|
|
188
|
-
* SABs see the
|
|
188
|
+
* SABs see the layout without it. */
|
|
189
189
|
readonly eventRingCapacitySlots?: number;
|
|
190
|
-
/** When provided, allocates the action ring
|
|
190
|
+
/** When provided, allocates the action ring
|
|
191
191
|
* inside the SAB at a stable offset between the entity-index/event-ring
|
|
192
192
|
* and the region-table directory. Main writes encoded actions to it;
|
|
193
193
|
* the sim worker drains them on each apply.
|
|
@@ -197,7 +197,7 @@ export interface CreateColumnStoreOptions {
|
|
|
197
197
|
* stays at 0 ("absent"); bare-SAB tests skip it. (Engine mechanism — the
|
|
198
198
|
* `Store` allocates one always-on; it is no longer a public ECS option.) */
|
|
199
199
|
readonly actionRingCapacitySlots?: number;
|
|
200
|
-
/** Consumer-declared SAB regions
|
|
200
|
+
/** Consumer-declared SAB regions. Each `StoreRegionSpec` carries an
|
|
201
201
|
* opaque `region_id`, a precomputed byte size, and an `init` closure; the
|
|
202
202
|
* engine lays them out after the mechanism regions, writes a generic
|
|
203
203
|
* region-table directory (`region_table.ts`) keyed by `region_id`, and
|
|
@@ -216,7 +216,7 @@ export interface CreateColumnStoreOptions {
|
|
|
216
216
|
* Omitted / 0 ⇒ NO bindings region (`bindings_off` stays 0, "absent") — the
|
|
217
217
|
* default for a pure-TS game that pays nothing for the WASM seam. This used
|
|
218
218
|
* to be the engine-baked `SIM_BINDINGS_BYTES` ABI constant reflected from the
|
|
219
|
-
* game's Zig struct;
|
|
219
|
+
* game's Zig struct; it is now de-welded, so a manifest edit no longer dirties
|
|
220
220
|
* the engine ABI golden. Re-derived across realloc by `optionsFromOld`
|
|
221
221
|
* (= `layout_descriptor_off - bindings_off`), so it survives grow/extend
|
|
222
222
|
* without a carried policy field. */
|
|
@@ -235,12 +235,12 @@ export interface ColumnStoreInternal extends ColumnStore {
|
|
|
235
235
|
* holds the absolute region size (natural + this), and once `natural`
|
|
236
236
|
* outgrows the margin the two are indistinguishable. The realloc slow path
|
|
237
237
|
* reads it via `optionsFromOld` and re-reserves the same margin, so a
|
|
238
|
-
* store that exhausts its headroom and reallocs keeps taking the
|
|
239
|
-
* in-place fast path instead of going permanently slow
|
|
238
|
+
* store that exhausts its headroom and reallocs keeps taking the
|
|
239
|
+
* in-place fast path instead of going permanently slow. The
|
|
240
240
|
* `*_in_place` paths carry it forward verbatim. */
|
|
241
241
|
readonly _reservedDescriptorBytes: number;
|
|
242
242
|
}
|
|
243
|
-
/** Typed recovery of `ColumnStoreInternal` from a public `ColumnStore
|
|
243
|
+
/** Typed recovery of `ColumnStoreInternal` from a public `ColumnStore`.
|
|
244
244
|
* Not every store is internal: `restoreColumnStore` deliberately returns a
|
|
245
245
|
* plain `{ buffer, view, header, archetypes }` (a snapshot carries no JS-side
|
|
246
246
|
* allocator or headroom policy), and grow/extend must send such a store down
|
|
@@ -252,8 +252,8 @@ export declare function isColumnStoreInternal(store: ColumnStore): store is Colu
|
|
|
252
252
|
* and construct one TypedArray view per column.
|
|
253
253
|
*
|
|
254
254
|
* The returned `ColumnStore` is the source of truth for "where every column
|
|
255
|
-
* lives in this SAB". `view_stamp` is initialised to 0 — a
|
|
256
|
-
* grow flow
|
|
255
|
+
* lives in this SAB". `view_stamp` is initialised to 0 — a SAB
|
|
256
|
+
* grow flow bumps it. */
|
|
257
257
|
export declare function createColumnStore(specs: readonly ArchetypeSpec[], allocator?: BufferAllocator, options?: CreateColumnStoreOptions): ColumnStore;
|
|
258
258
|
/** Default command-ring slot count used by `ECS.Store` when constructing
|
|
259
259
|
* its SAB. Re-exported here so the Store doesn't reach across modules. */
|
|
@@ -51,7 +51,7 @@ export interface ArchetypeViews {
|
|
|
51
51
|
}
|
|
52
52
|
export interface ColumnStore {
|
|
53
53
|
/** The backing buffer. `ArrayBufferLike` because the store is backing-agnostic:
|
|
54
|
-
* a `SharedArrayBuffer` for the SAB/WASM/worker profile, or a plain
|
|
54
|
+
* a `SharedArrayBuffer` for the SAB/WASM/worker profile, or a plain fixed
|
|
55
55
|
* `ArrayBuffer` for the pure-TS heap profile (`heapArraybufferAllocator`).
|
|
56
56
|
* Consumers that genuinely require sharing (worker transfer, WASM memory)
|
|
57
57
|
* narrow back to `SharedArrayBuffer` at their boundary. */
|
|
@@ -88,12 +88,12 @@ export declare function columnKey(componentId: number, fieldId: number): number;
|
|
|
88
88
|
* real matches three orders of magnitude below this, but the cap is tunable
|
|
89
89
|
* and callers are invited to raise it for bigger worlds — so the layout step
|
|
90
90
|
* guards the hard 2³¹ ceiling explicitly rather than relying on the policy
|
|
91
|
-
* cap to stay in front of it
|
|
91
|
+
* cap to stay in front of it. */
|
|
92
92
|
export declare const STORE_MAX_BYTE_OFFSET: number;
|
|
93
93
|
/** Thrown when a SAB column layout would place an offset at or beyond
|
|
94
94
|
* {@link STORE_MAX_BYTE_OFFSET} (2³¹), past which the signed-32-bit bitwise
|
|
95
95
|
* `alignUp` can no longer produce correct offsets. This is a hard ceiling,
|
|
96
|
-
* not the (tunable, much lower) 256 MiB allocator cap
|
|
96
|
+
* not the (tunable, much lower) 256 MiB allocator cap. */
|
|
97
97
|
export declare class StoreLayoutOverflowError extends Error {
|
|
98
98
|
constructor(byteOff: number);
|
|
99
99
|
}
|
|
@@ -102,7 +102,7 @@ export declare class StoreLayoutOverflowError extends Error {
|
|
|
102
102
|
*
|
|
103
103
|
* Throws {@link StoreLayoutOverflowError} when the rounded offset would reach
|
|
104
104
|
* {@link STORE_MAX_BYTE_OFFSET}, because the `& ~(align-1)` step coerces to a
|
|
105
|
-
* signed 32-bit int and wraps past 2
|
|
105
|
+
* signed 32-bit int and wraps past 2³¹. The guard fires before the
|
|
106
106
|
* bitwise op so any returned offset is always a correct, in-range value.
|
|
107
107
|
* Shared by `extend.ts` and `grow.ts`, whose in-place paths compute tail
|
|
108
108
|
* byte_offs without going through `planLayout`. */
|
|
@@ -114,12 +114,12 @@ export declare function alignUp(off: number, align: number): number;
|
|
|
114
114
|
* `headroomBytes` reserves slack at the end of the descriptor region — ON
|
|
115
115
|
* TOP OF the natural size for `specs` — so future extends can append new
|
|
116
116
|
* descriptor entries without shifting existing column byte_offs. Used by
|
|
117
|
-
* the growable-SAB path
|
|
117
|
+
* the growable-SAB path — column views stay valid across
|
|
118
118
|
* `extendColumnStore` because their byte_offs don't move.
|
|
119
119
|
*
|
|
120
|
-
* Additive, not a floor
|
|
120
|
+
* Additive, not a floor: `regionSize = natural + headroom`, NOT
|
|
121
121
|
* `max(natural, headroom)`. A floor only yields slack while `natural` is
|
|
122
|
-
* below it; the moment the descriptor region outgrows the floor (the
|
|
122
|
+
* below it; the moment the descriptor region outgrows the floor (the
|
|
123
123
|
* headroom exhausts and a realloc re-plans the merged spec set), a floor
|
|
124
124
|
* would size the region to exactly `natural` — zero slack — and every
|
|
125
125
|
* subsequent extend would take the slow realloc path forever after. The
|
|
@@ -138,11 +138,11 @@ export { planLayout };
|
|
|
138
138
|
/** Optional configuration for `createColumnStore`. */
|
|
139
139
|
export interface CreateColumnStoreOptions {
|
|
140
140
|
/** Extra slack to reserve at the end of the layout descriptor region,
|
|
141
|
-
* ON TOP OF the natural size for `specs` (
|
|
141
|
+
* ON TOP OF the natural size for `specs` (additive, not a floor).
|
|
142
142
|
* The descriptor region is padded with this many unused bytes so future
|
|
143
143
|
* `extendColumnStore` calls can append new archetype descriptors into the
|
|
144
144
|
* slack without shifting existing column byte_offs. Pairs with
|
|
145
|
-
* `growableSabAllocator` to give the
|
|
145
|
+
* `growableSabAllocator` to give the in-place fast path: existing
|
|
146
146
|
* TypedArray column views stay valid across extends because their offsets
|
|
147
147
|
* and the underlying buffer both stay put.
|
|
148
148
|
*
|
|
@@ -150,9 +150,9 @@ export interface CreateColumnStoreOptions {
|
|
|
150
150
|
* value lives on `ColumnStoreInternal._reservedDescriptorBytes` and
|
|
151
151
|
* `optionsFromOld` re-applies it, so a store that exhausts its headroom
|
|
152
152
|
* and reallocs gets a fresh margin rather than dropping to zero slack and
|
|
153
|
-
* going permanently slow
|
|
153
|
+
* going permanently slow. */
|
|
154
154
|
readonly reservedDescriptorBytes?: number;
|
|
155
|
-
/** When provided, allocates a command ring
|
|
155
|
+
/** When provided, allocates a command ring inside
|
|
156
156
|
* the SAB at a stable offset right after the 48-byte header. Slot
|
|
157
157
|
* count MUST be a power of two; `COMMAND_RING_DEFAULT_CAPACITY_SLOTS`
|
|
158
158
|
* (256) is the canonical value. Omitted ⇒ no ring; `command_ring_off`
|
|
@@ -164,8 +164,8 @@ export interface CreateColumnStoreOptions {
|
|
|
164
164
|
* `growColumnStore` calls, since those grow the descriptor region and
|
|
165
165
|
* the column tail but never the bytes between header and descriptor. */
|
|
166
166
|
readonly commandRingCapacitySlots?: number;
|
|
167
|
-
/** When provided, allocates the entity-index region
|
|
168
|
-
*
|
|
167
|
+
/** When provided, allocates the entity-index region inside the SAB at a
|
|
168
|
+
* stable offset between the command ring
|
|
169
169
|
* (or header) and the descriptor region. Holds `(generations,
|
|
170
170
|
* archetypes, rows)` triples indexed by entity slot; the engine's
|
|
171
171
|
* `Store` populates them as entities are created/moved/destroyed,
|
|
@@ -176,7 +176,7 @@ export interface CreateColumnStoreOptions {
|
|
|
176
176
|
* `ENTITY_INDEX_DEFAULT_CAPACITY`; bare-SAB tests can leave it
|
|
177
177
|
* absent. */
|
|
178
178
|
readonly entityIndexCapacity?: number;
|
|
179
|
-
/** When provided, allocates the event ring
|
|
179
|
+
/** When provided, allocates the event ring
|
|
180
180
|
* inside the SAB at a stable offset between the entity-index region
|
|
181
181
|
* and the descriptor region. Same SPSC shape as the command ring;
|
|
182
182
|
* carries ECS signal payloads so Zig systems can emit and consume
|
|
@@ -185,9 +185,9 @@ export interface CreateColumnStoreOptions {
|
|
|
185
185
|
* Slot count MUST be a power of two; `EVENT_RING_DEFAULT_CAPACITY_SLOTS`
|
|
186
186
|
* (256) is the canonical value. Omitted ⇒ no ring; `event_ring_off`
|
|
187
187
|
* stays at 0 ("absent"); existing test fixtures with hand-rolled
|
|
188
|
-
* SABs see the
|
|
188
|
+
* SABs see the layout without it. */
|
|
189
189
|
readonly eventRingCapacitySlots?: number;
|
|
190
|
-
/** When provided, allocates the action ring
|
|
190
|
+
/** When provided, allocates the action ring
|
|
191
191
|
* inside the SAB at a stable offset between the entity-index/event-ring
|
|
192
192
|
* and the region-table directory. Main writes encoded actions to it;
|
|
193
193
|
* the sim worker drains them on each apply.
|
|
@@ -197,7 +197,7 @@ export interface CreateColumnStoreOptions {
|
|
|
197
197
|
* stays at 0 ("absent"); bare-SAB tests skip it. (Engine mechanism — the
|
|
198
198
|
* `Store` allocates one always-on; it is no longer a public ECS option.) */
|
|
199
199
|
readonly actionRingCapacitySlots?: number;
|
|
200
|
-
/** Consumer-declared SAB regions
|
|
200
|
+
/** Consumer-declared SAB regions. Each `StoreRegionSpec` carries an
|
|
201
201
|
* opaque `region_id`, a precomputed byte size, and an `init` closure; the
|
|
202
202
|
* engine lays them out after the mechanism regions, writes a generic
|
|
203
203
|
* region-table directory (`region_table.ts`) keyed by `region_id`, and
|
|
@@ -216,7 +216,7 @@ export interface CreateColumnStoreOptions {
|
|
|
216
216
|
* Omitted / 0 ⇒ NO bindings region (`bindings_off` stays 0, "absent") — the
|
|
217
217
|
* default for a pure-TS game that pays nothing for the WASM seam. This used
|
|
218
218
|
* to be the engine-baked `SIM_BINDINGS_BYTES` ABI constant reflected from the
|
|
219
|
-
* game's Zig struct;
|
|
219
|
+
* game's Zig struct; it is now de-welded, so a manifest edit no longer dirties
|
|
220
220
|
* the engine ABI golden. Re-derived across realloc by `optionsFromOld`
|
|
221
221
|
* (= `layout_descriptor_off - bindings_off`), so it survives grow/extend
|
|
222
222
|
* without a carried policy field. */
|
|
@@ -235,12 +235,12 @@ export interface ColumnStoreInternal extends ColumnStore {
|
|
|
235
235
|
* holds the absolute region size (natural + this), and once `natural`
|
|
236
236
|
* outgrows the margin the two are indistinguishable. The realloc slow path
|
|
237
237
|
* reads it via `optionsFromOld` and re-reserves the same margin, so a
|
|
238
|
-
* store that exhausts its headroom and reallocs keeps taking the
|
|
239
|
-
* in-place fast path instead of going permanently slow
|
|
238
|
+
* store that exhausts its headroom and reallocs keeps taking the
|
|
239
|
+
* in-place fast path instead of going permanently slow. The
|
|
240
240
|
* `*_in_place` paths carry it forward verbatim. */
|
|
241
241
|
readonly _reservedDescriptorBytes: number;
|
|
242
242
|
}
|
|
243
|
-
/** Typed recovery of `ColumnStoreInternal` from a public `ColumnStore
|
|
243
|
+
/** Typed recovery of `ColumnStoreInternal` from a public `ColumnStore`.
|
|
244
244
|
* Not every store is internal: `restoreColumnStore` deliberately returns a
|
|
245
245
|
* plain `{ buffer, view, header, archetypes }` (a snapshot carries no JS-side
|
|
246
246
|
* allocator or headroom policy), and grow/extend must send such a store down
|
|
@@ -252,8 +252,8 @@ export declare function isColumnStoreInternal(store: ColumnStore): store is Colu
|
|
|
252
252
|
* and construct one TypedArray view per column.
|
|
253
253
|
*
|
|
254
254
|
* The returned `ColumnStore` is the source of truth for "where every column
|
|
255
|
-
* lives in this SAB". `view_stamp` is initialised to 0 — a
|
|
256
|
-
* grow flow
|
|
255
|
+
* lives in this SAB". `view_stamp` is initialised to 0 — a SAB
|
|
256
|
+
* grow flow bumps it. */
|
|
257
257
|
export declare function createColumnStore(specs: readonly ArchetypeSpec[], allocator?: BufferAllocator, options?: CreateColumnStoreOptions): ColumnStore;
|
|
258
258
|
/** Default command-ring slot count used by `ECS.Store` when constructing
|
|
259
259
|
* its SAB. Re-exported here so the Store doesn't reach across modules. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column_store.d.ts","sourceRoot":"","sources":["../../../src/core/store/column_store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAKN,KAAK,WAAW,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,KAAK,mBAAmB,EAExB,KAAK,YAAY,EAKjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,mCAAmC,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,iCAAiC,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAKN,KAAK,eAAe,EACpB,MAAM,gBAAgB,CAAC;AAExB,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;CAC/B;AAED;kEACkE;AAClE,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,aAAa,EAAE,SAAS,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;AACzB,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,SAAS,aAAa,EAAE,EAC/B,SAAS,GAAE,eAAuC,EAClD,OAAO,GAAE,wBAA6B,GACpC,WAAW,CA2Hb;AAED;0EAC0E;AAC1E,OAAO,EAAE,mCAAmC,EAAE,CAAC;AAE/C;2EAC2E;AAC3E,OAAO,EAAE,6BAA6B,EAAE,CAAC;AAEzC;wDACwD;AACxD,OAAO,EAAE,iCAAiC,EAAE,CAAC;AAE7C;;;;uDAIuD;AACvD,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,eAAe,EACvB,WAAW,EAAE,SAAS,mBAAmB,EAAE,GACzC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CA4B7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Command dispatch — the generic drain surface a consumer registers against
|
|
3
|
-
* (
|
|
3
|
+
* (a game-agnostic ECS).
|
|
4
4
|
*
|
|
5
5
|
* The command ring (`command_ring.ts`) carries opaque `(opCode, payload)`
|
|
6
6
|
* slots; the engine never interprets a code. This module is the thin,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Command dispatch — the generic drain surface a consumer registers against
|
|
3
|
-
* (
|
|
3
|
+
* (a game-agnostic ECS).
|
|
4
4
|
*
|
|
5
5
|
* The command ring (`command_ring.ts`) carries opaque `(opCode, payload)`
|
|
6
6
|
* slots; the engine never interprets a code. This module is the thin,
|