import { VM, toBytecode, type Value, toString, toNull } from "#reef" const bytecode = toBytecode(` PUSH 5 PUSH 10 ADD CALL_NATIVE print `) const vm = new VM(bytecode) vm.registerFunction('print', (...args: Value[]): Value => { console.log(...args.map(toString)) return toNull() }) console.write('5 + 10 = ') await vm.run()