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

Fmt

~import std/fmt

Koru Standard Library: String Formatting

fmt.kz · 5 tors · ~[comptime]· ~[runtime]

Koru Standard Library: String Formatting Zero-overhead string formatting with Liquid-style templates. Returns allocated strings with phantom obligation tracking. DESIGN: "Hidden but overridable" - fmt.blk: Uses page_allocator internally, user never thinks about it - fmt.blk.with_allocator: Explicit control when needed - Auto-discharge handles cleanup via phantom obligations

Phantom lifecycles

Derived from the phantom labels in the declarations below — state! issues an obligation the compiler will chase, !state discharges it, a bare state holds it without moving it. Nothing here is hand-drawn.

FormattedText 1 state
string 1 state allocated!

fmt.dealloc

<!allocated> koru_std/fmt.kz:28

fmt.blk

comptimetransform koru_std/fmt.kz:56

fmt.blk.impl

norun <std.io:allocated!> koru_std/fmt.kz:64

ln

comptimetransform koru_std/fmt.kz:358

ln.impl

norun koru_std/fmt.kz:365