This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 10/5/2026.
Io.blk
~import std/io.blkKoru Standard Library: I/O — the `print.blk` family.
io.blk.kz · 2 tors
Koru Standard Library: I/O — the `print.blk` family. · 19 more lines
Koru Standard Library: I/O — the `print.blk` family.
Joined via `~part blk` in io.kz; merged into the io module at load.
Lifted out of io.kz so both files stay under their line baselines;
module-scope names (KORU_OUT_FN, __appendFmtLiteralByte,
codegen_utils_io, the expr_parser idiom) resolve through the merge.
PRINT.BLK - Multi-line block printing with Source block (ZERO OVERHEAD)
Syntax: std/io:print.blk {
Header: {{ title }}
Value: {{ count }}
}
ARCHITECTURE:
- Takes a Source block (multi-line text)
- Parses {{ ... }} and {% if %} placeholders
- Generates inline Zig print statement
This is NOT a regular tor - it's a pure compile-time transformation.
~[comptime|transform] pub tor print.blk {
source: Source,
invocation: *const Invocation,
item: std/compiler:*const Item,
program: std/compiler:*const Program,
reporter: std/compiler:*ErrorReporter,
allocator: std.mem.Allocator
} -> SiteResult~[norun] pub tor print.blk.impl { text: string }