This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.
Store.new
~import std/store.newKoru Standard Library: Reactive Stores — the `new` event.
store.new.kz · 1 tors
Koru Standard Library: Reactive Stores — the `new` event.
Joined via `~part new` in store.kz; merged into the store module at load.
STORE.CREATE — declare + instantiate a store; the (f) coordinator
std/store:new(game) { entities: 0[i64] } — capacity-1 VALUE
std/store:new(pool, capacity: 64) { hp: i64 } — CONTAINER (rows)
Name arg + seed block (kernel:shape's surface). CAPACITY selects the
shape (690_050 ruling): default 1 → reactive value, > 1 → container.
A field is bare-typed (`hp: i64`) or carries a default via the bracket
annotation (`hp: 100[i64]` — same parser as const/capture); defaults
are orthogonal to shape.
// Koru Standard Library: Reactive Stores — the `new` event.
// Joined via `~part new` in store.kz; merged into the store module at load.
//
// STORE.CREATE — declare + instantiate a store; the (f) coordinator
//
// std/store:new(game) { entities: 0[i64] } — capacity-1 VALUE
// std/store:new(pool, capacity: 64) { hp: i64 } — CONTAINER (rows)
//
// Name arg + seed block (kernel:shape's surface). CAPACITY selects the
// shape (690_050 ruling): default 1 → reactive value, > 1 → container.
// A field is bare-typed (`hp: i64`) or carries a default via the bracket
// annotation (`hp: 100[i64]` — same parser as const/capture); defaults
// are orthogonal to shape.
~[keyword|comptime|transform] pub tor new {
expr: Expression,
source: Source,
invocation: *const Invocation,
item: std/compiler:*const Item,
program: std/compiler:*const Program,
reporter: std/compiler:*ErrorReporter,
allocator: std.mem.Allocator
} -> SiteResult