Since it’s a small language that already supports yielding for I/O, it shouldn’t be too hard to automatically insert an instruction into all loops to check if they need to pause. You could write it manually to prototype.
(Or at least I assume it works that way based on studying Wren.)
(Or at least I assume it works that way based on studying Wren.)