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

Guide

import std/guide

guide.kz — std/guide: attach teaching surfaces to tors/edges as dead

guide.kz · 5 tors

guide.kz — std/guide: attach teaching surfaces to tors/edges as dead · 19 more lines
guide.kz — std/guide: attach teaching surfaces to tors/edges as dead AST data, looked up by key at runtime. The module is deliberately dumb: it stores (key -> template) pairs harvested from the program AST at compile time and answers key lookups. It does not know what a template IS — rendering is the caller's job (Liquid engine or whatever the smart tool chooses). Attach (write side, comptime|norun — dead data, never executed): std/guide:add(my-thing) { ...template... } std/guide:add(book-flight | error) { ...lesson... } Read (evaluated expression, dynamic key): std/guide:lookup(table, key: guide:key("book-flight", branch)) | guide template |> ...render/inject... | not-found |> ...silence is default... The key contract: BOTH sides build keys through guide:key so the attach-time name and the query-time string can never drift.

add

comptimetransform koru_std/guide.kz:44

collect

comptime koru_std/guide.kz:251

~part match koru_std/guide.match.kz

guide.match.kz — the table read + match half of std/guide: the row lookup every entry point shares (exact key first, then best wildcard specificity). Split out of guide.kz when the pub match API grew the file past its pin; joined via `~part match`. A matched table row: the PATTERN key that fired (which may be the query key itself, or a wildcard row like `*->error`) and its template. Both slices are owned by the caller's allocator.