Wrenlift

System

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

MethodWhat it does
System.print(value)Print value.toString followed by a newline. Returns value for chaining.
System.printPrint a blank line.
System.printAll(seq)Print every element of seq, joined into one line, then a newline.
System.write(value)Print without a trailing newline.
System.writeAll(seq)write over a sequence.
System.print("hello, world")
System.write("loading…")
System.print(1 + 2)            // 3

Clocks

MethodWhat it does
System.clockWall-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

MethodWhat 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).