Process-level I/O and runtime introspection. Always in scope — no import needed. This page covers the surface specific to Wrenlift; for the stock Wren System methods see wren.io.
Print & write
Method
What it does
System.print(value)
Print value.toString followed by a newline. Returns value for chaining.
System.print
Print a blank line.
System.printAll(seq)
Print every element of seq, joined into one line, then a newline.
Wall-clock seconds since the runtime started. Monotonic; for benchmarking, not for time-of-day.
var t = System.clock
expensive()
System.print((System.clock - t) * 1000) // ms
Garbage collection
Method
What it does
System.gc()
Trigger a GC cycle. Useful between batches in long-running scripts so short-lived allocations don't get promoted to the old gen.
// In a game loop:
_frame = _frame + 1
if (_frame % 30 == 0) System.gc()
Process
Process-level extras — environment variables, arguments,
exit — live in
@hatch:os,
not on System. The split keeps embed-friendly
scripts portable (the wasm runtime has no
std::env; @hatch:os is host-only).