This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.

Proto

~import std/proto

Koru Standard Library: Proto — compound identity declarations

proto.kz · 13 tors

Koru Standard Library: Proto — compound identity declarations · 25 more lines
Koru Standard Library: Proto — compound identity declarations The compound front door for proto entries. `std/proto(Name) { fields }` invokes this module's `default` event through the default-event rule (`std/M(args)` ≡ `std/M:default(args)`; see import_pipeline.zig rewriteDefaultEventCalls). The module name IS the verb — `default` is reachable only through the path, never bare. SURFACE: std/proto(Player) { health: Health, hp: f32 } declares a COMPILE-TIME registry entry — layout-silent, with no emission of its own. The first consumer derives what it needs (std/list:new synthesizes the element struct plus its `List_<Name>` container from these fields). The terminal half of the system — named primitives (`std/proto:f64(Health)`) — is the same act at field count zero and lands here as the system grows. RULED 2026-08-23 → 09-03 (frag-type-system-design, proto rung; co-derived on the 09-03 walk): a proto names an AFFINITY, never a coupling — the entry is the identity, "same thing" is by NAME ONLY, and the layout system may merge only what a shared name proves identical (never two anonymous fields that merely look alike). Two registrants of the same name are a loud collision; values over two different protos must not interchange (both refused at the KORU layer by the nominal-distinctness gate; see scanDeclaredTypes + the container registration it derives).

default

comptimetransform koru_std/proto.kz:32

i8

comptimetransform koru_std/proto.kz:475

i16

comptimetransform koru_std/proto.kz:485

i32

comptimetransform koru_std/proto.kz:495

i64

comptimetransform koru_std/proto.kz:505

u8

comptimetransform koru_std/proto.kz:515

u16

comptimetransform koru_std/proto.kz:525

u32

comptimetransform koru_std/proto.kz:535

u64

comptimetransform koru_std/proto.kz:545

f32

comptimetransform koru_std/proto.kz:555

f64

comptimetransform koru_std/proto.kz:565

bool

comptimetransform koru_std/proto.kz:575

string

comptimetransform koru_std/proto.kz:585