These libraries are experimental. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.
Signal
@korulang/signal@0.0.1Stateful signal graphs — named models, external clock, compile-to-Zig through shared signal-processing codegen
signal/index.kz · 8 tors
@korulang/signal — stateful signal graphs, Koru-native surface. · 24 more lines
@korulang/signal — stateful signal graphs, Koru-native surface.
Discrete-time signal processing: named models, external clock, compile-to-Zig.
INSTANCE MODEL — parallel to std/store + std/kernel:
koru/signal:shape(Breath) { pass_rate: f64 ... } port/wire declaration (norun)
const { depth_floor: 8 ... } design constants (010_004)
koru/signal:init(Breath) { peak: 0 ... } carried-state seed
block { peak[f64] ... } tick body (reduce name[type] grammar)
koru/signal:init(Breath) compile + register named instance
koru/signal(Breath) bare reference to compiled model
koru/signal:tick(Breath, pass_rate: r) external-clock step (operation)
`:init` is the compile boundary; `:tick` is the external-clock join — the
caller owns the loop and pushes snapshots; signal does not own a pump.
v0 models: Breath (sustained drawdown) + Floor (threshold). F3 widens registry.
SLICES (mechanical blocks — see signal/SERIES.md):
A surface transforms — A1+A2+A3 landed
B instance registry — B1+B2 landed
C emit pipeline — C2 regen; C3 per-model link via appended imports + signal_rt/
D :shape norun — D1 landed
E Koru → EEL IR → emitModule
~[norun] pub tor shape { expr: Expression, source: Source }~[keyword|comptime|transform] pub tor init {
expr: Expression,
invocation: *const Invocation,
item: *const Item,
program: *const Program,
reporter: std/compiler:*ErrorReporter,
allocator: std.mem.Allocator
} -> SiteResultinit.model
index.kz:173~pub tor init.model { model: string }
| ok
| err string~[keyword|comptime|transform] pub tor tick {
expr: Expression,
invocation: *const Invocation,
item: *const Item,
program: *const Program,
reporter: std/compiler:*ErrorReporter,
allocator: std.mem.Allocator
} -> SiteResulttick.model
index.kz:268~pub tor tick.model { model: string, pass_rate: f64 }
| out { alarm: f64, dip_ticks: f64 }
| err string~[norun] pub tor nop {}register.model
index.kz:280~pub tor register.model { model: string }~[keyword|comptime|transform|pre] pub tor default {
expr: Expression,
invocation: *const Invocation,
item: *const Item,
program: *const Program,
reporter: std/compiler:*ErrorReporter,
allocator: std.mem.Allocator
} -> SiteResult