Ouro
Types
NodeId type
type NodeId = numberListId type
type ListId = numberSymbolId type
type SymbolId = numberBindingId type
type BindingId = numberGrammarFlags type
type GrammarFlags = { [string]: boolean }ResolvedFlags type
type ResolvedFlags = { [string]: boolean }ParseOptions type
type ParseOptions = {
profile: ("upstream" | "studio" | "experimental" | GrammarFlags)?, -- grammar profile name or explicit flag map
lossless: boolean?, -- retain compact token/trivia tape for `reconstruct()`
captureComments: boolean?, -- collect comments separately (auto-enabled by `lossless`)
allowDeclarationSyntax: boolean?, -- enable `.d.luau` `declare` syntax
requireEOF: boolean?, -- require trailing EOF on fragment entrypoints
noErrorLimit: boolean?, -- disable `errorLimit` cap when `true`
recursionLimit: number?, -- maximum nested parser recursion depth (default `1,000`)
typeLengthLimit: number?, -- maximum items in a type list or union/intersection chain (default `1,000`)
errorLimit: number?, -- maximum diagnostics before aborting with `"limit"` (default `100`)
checkpointInterval: number?, -- scanned byte interval between `checkpoint` calls (default `4,096`)
checkpoint: ((offset: number) -> boolean?)?, -- cooperative yield or cancel callback (`false` cancels)
}Configuration options for Ouro.parse, parseExpression, parseType, and newContext.
Diagnostic type
type Diagnostic = { start: number, finish: number, message: string, code: "syntax" | "limit" | "compile" }Comment type
type Comment = { kind: number, start: number, finish: number }HotComment type
type HotComment = { header: boolean, content: string, start: number, finish: number }TokenTape type
type TokenTape = { kinds: { number }, starts: { number }, finishes: { number }, count: number }AstTable type
type AstTable = { type: string, start: number?, finish: number?, [string]: any }AstVisitor type
type AstVisitor = {
enter: ((nodeId: NodeId, kind: number, depth: number) -> boolean?)?,
leave: ((nodeId: NodeId, kind: number, depth: number) -> ())?,
}Visitor callbacks for ParseResult:visit. Return false from enter to skip child traversal.
Node type
type Node = { kind: number, start: number, finish: number, [string]: any }Binding type
type Binding = {
name: SymbolId,
start: number,
finish: number,
annotation: NodeId,
shadow: BindingId,
functionDepth: number,
loopDepth: number,
scopeDepth: number,
isConst: boolean,
isExported: boolean,
}Arena type
type Arena = {
nodes: { Node },
kinds: { number },
starts: { number },
finishes: { number },
hasTypeAnnotations: boolean,
hasClasses: boolean,
listFirsts: { number },
listCounts: { number },
listValues: { any },
bindings: { Binding },
symbols: { string },
kind: (Arena, NodeId) -> number,
kindName: (Arena, NodeId) -> string,
listCount: (Arena, ListId) -> number,
listAt: (Arena, ListId, number) -> any,
listItems: (Arena, ListId) -> { any },
}Read-only AST arena returned on ParseResult.arena.
ParseResult type
type ParseResult = {
status: "ok" | "syntaxError" | "limit" | "cancelled", -- parse outcome (`root == 0` on `"limit"` or `"cancelled"`)
root: NodeId, -- root AST node ID (`0` if aborted)
arena: Arena, -- flat SoA + record AST arena owned by this result
source: string, -- original source string passed to the parser
diagnostics: { Diagnostic }, -- reported syntax, limit, or compile errors
lineStarts: { number }, -- zero-based byte offsets where each LF-delimited line starts
comments: { Comment }, -- captured comments when `captureComments` or `lossless` is enabled
hotcomments: { HotComment }, -- parsed `--!` / header hotcomments
tape: TokenTape?, -- lossless lexical tape when `lossless = true`
profile: "upstream" | "studio" | "experimental" | "custom", -- resolved grammar profile name
flags: ResolvedFlags, -- frozen grammar boolean map active during the parse
kind: (ParseResult, NodeId) -> number,
kindName: (ParseResult, NodeId) -> string,
range: (ParseResult, NodeId) -> (number, number),
text: (ParseResult, NodeId) -> string,
position: (ParseResult, number) -> (number, number),
offset: (ParseResult, number, number) -> number,
formatDiagnostic: (ParseResult, Diagnostic) -> string,
formatDiagnostics: (ParseResult) -> string,
childCount: (ParseResult, NodeId) -> number,
childAt: (ParseResult, NodeId, number) -> NodeId,
forEachChild: (ParseResult, NodeId, (NodeId) -> boolean?) -> (),
visit: (ParseResult, AstVisitor | ((NodeId, number, number) -> boolean?)) -> (),
reconstruct: (ParseResult) -> string,
}Structured result returned by Ouro.parse, parseExpression, and parseType.
ParserContext type
type ParserContext = {
busy: boolean, -- true while a parse (possibly suspended at a checkpoint) is active
options: ParseOptions,
reset: (ParserContext) -> (),
parse: (ParserContext, string) -> ParseResult,
parseExpression: (ParserContext, string) -> ParseResult,
parseType: (ParserContext, string) -> ParseResult,
}Reusable parser handle with pre-validated options, cooperative checkpoint lifecycle (busy, reset), and recycled scratch tables.
CompileConstant type
type CompileConstant = { type: "nil" }
| { type: "boolean", value: boolean }
| { type: "number", value: number }
| { type: "vectorf", value: { number } }
| { type: "vectord", value: { number } }
| { type: "string", value: string }
| { type: "table", value: { [string]: CompileConstant } }ProtoTableConstant type
type ProtoTableConstant = {
keys: { number },
constants: { number }?,
length: number,
}ProtoClassConstant type
type ProtoClassConstant = {
className: number,
numPrivateInstanceProps: number,
numPrivateStaticProps: number,
propertyNames: { number },
methodNames: { number },
}Proto type
type Proto = {
id: number,
maxstacksize: number,
numparams: number,
nups: number,
isvararg: boolean,
flags: number,
code: { number },
kTypes: { number },
kValues: { any },
p: { number },
linedefined: number,
debugname: string?,
lineData: string?,
linegaplog2: number?,
locvars: { { varname: string?, startpc: number, endpc: number, reg: number } }?,
upvalues: { string? }?,
typeinfo: string?,
}ProtoModule type
type ProtoModule = {
version: number,
typesversion: number,
strings: { string },
protos: { Proto },
mainid: number,
userdataTypes: { string }?,
}In-memory decoded bytecode module produced by Bytecode.deserialize and Compiler.compileProto.
BytecodeEncoder type
type BytecodeEncoder = ((number) -> number) | { encode: (self: any, code: { number }) -> () }BytecodeDecoder type
type BytecodeDecoder = ((number) -> number) | { decode: (self: any, code: { number }) -> () }CompileOptions type
type CompileOptions = {
optimizationLevel: number?, -- `0` = none, `1` = baseline folding & fastcalls (default), `2` = inlining & unrolling
debugLevel: number?, -- `0` = stripped, `1` = line info & function names (default), `2` = locals & upvalues
typeInfoLevel: number?, -- `0` = annotated functions only (default), `1` = all functions
coverageLevel: number?, -- `0` = disabled (default), `1` = statements, `2` = statements & expressions
vectorLib: string?, -- global library name for vector constructor lowering (e.g. `"Vector3"`)
vectorCtor: string?, -- constructor member name on `vectorLib` (e.g. `"new"`)
vectorType: string?, -- vector annotation name used for typed local specialization
vectorPrecision: number?, -- `0` = 32-bit float vectors (default), `1` = 64-bit doubles
mutableGlobals: { string }?, -- globals excluded from immutable builtin optimization
userdataTypes: { string }?, -- known host userdata type names for type-info emission
librariesWithKnownMembers: { string }?, -- library names eligible for `libraryMember*Cb` callbacks
libraryMemberTypeCb: ((library: string, member: string) -> number)?, -- returns `Ouro.Bytecode.Types` tag (`0..255`)
libraryMemberConstantCb: ((library: string, member: string) -> CompileConstant?)?,
disabledBuiltins: { string }?, -- builtin names or wildcards (`"math.*"`, `"*"`) excluded from fastcalls
encoder: BytecodeEncoder?, -- custom instruction opcode encoder for serialized bytecode
dumpFlags: number?, -- bitmask of `Ouro.Bytecode.DumpFlags` for remarks and disassembly dumps
flags: { [string]: boolean | number }?, -- overrides matching `Ouro.Compiler.CompilerFlags`
parseOptions: ParseOptions?, -- forwarded to the parser when input is source text
maxInstructions: number?, -- maximum total instruction words emitted across all protos (default `2,000,000`)
allowDirectives: boolean?, -- allow `--!optimize`/`--!native`/`@native` to raise levels above caller options (defaults `true` in `compile` and `load`; `false` in `"strict"` and `"balanced"` sandboxes)
}Configuration options for Ouro.compile, Ouro.compileResult, and Ouro.Compiler.compileProto.
BytecodeBuilder type
type BytecodeBuilder = {
getBytecode: (self: BytecodeBuilder) -> string,
toProtoModule: (self: BytecodeBuilder) -> ProtoModule,
setDumpSource: (self: BytecodeBuilder, source: string) -> (),
dumpFunction: (self: BytecodeBuilder, fid: number) -> string,
dumpEverything: (self: BytecodeBuilder) -> string,
dumpSourceRemarks: (self: BytecodeBuilder) -> string,
dumpTypeInfo: (self: BytecodeBuilder) -> string,
}Mutable bytecode builder returned on CompileResult.builder.
ResourceLimits type
type ResourceLimits = {
maxStringLength: number?, -- maximum string byte length produced by stdlib calls or `CONCAT`
maxTableSize: number?, -- maximum element count in constructors (`table.create`, `NEWTABLE`, `SETLIST`, `table.insert`/`move`/`clone`/`pack`/`split`)
maxBufferSize: number?, -- maximum buffer size allocated through `buffer` helpers
maxPatternLength: number?, -- maximum pattern length passed to `string.find`/`match`/`gmatch`/`gsub`
maxPatternSteps: number?, -- maximum matching/backtracking steps per pattern operation (default `100,000` when `resourceLimits` is active)
maxMemoryBytes: number?, -- cumulative estimated allocation budget in bytes across strings, buffers, tables, closures, and new keys
}Opt-in allocation and pattern caps enforced by VM standard libraries and constructors.
EnvironmentOptions type
type EnvironmentOptions = {
inheritHost: boolean?, -- inherit non-standard host or Roblox globals (defaults `false`, excludes `script` and `loadstring`)
libraries: { string }?, -- stdlib allowlist (`"base"`, `"bit32"`, `"buffer"`, `"coroutine"`, `"debug"`, `"math"`, `"os"`, `"string"`, `"table"`, `"utf8"`, `"vector"`)
readOnly: boolean?, -- freeze environment or wrap host inheritance in a locked read-only proxy
resourceLimits: ResourceLimits?, -- opt-in stdlib and constructor caps (`nil` for zero overhead)
}Configuration options for Ouro.VM.createEnvironment.
DebugFrameInfo type
type DebugFrameInfo = {
source: string,
line: number,
name: string?,
numparams: number,
isvararg: boolean,
depth: number,
}Frame snapshot passed to LoadOptions debug callbacks (onCall, onReturn, onLine, onBreak).
CoverageEntry type
type CoverageEntry = {
name: string?,
lineDefined: number,
hits: { [number]: number },
totalHits: number,
}Per-function line execution counts returned by Ouro.VM.getCoverage.
UpvalueInfo type
type UpvalueInfo = {
index: number,
name: string?,
value: any,
}Captured upvalue metadata returned by Ouro.VM.getUpvalues.
LoadMode type
type LoadMode = "text" | "binary" | "auto"LoadOptions type
type LoadOptions = {
name: string?, -- chunk name for stack traces (`"=chunk"` for binary inputs, `[string "..."]` for text)
env: { [any]: any }?, -- custom global environment (defaults to a fresh isolated `VM.createEnvironment()`)
compile: CompileOptions?, -- compiler options when loading text source chunks
decoder: BytecodeDecoder?, -- reverses a custom `CompileOptions.encoder` on binary bytecode
mode: LoadMode?, -- `"text"`, `"binary"`, or `"auto"` header sniffing (defaults `"text"` for strings, `"binary"` for buffers)
timeout: number?, -- lazy wall-clock deadline in seconds (`os.clock()`) started on first invocation
instructionLimit: number?, -- maximum VM instructions executed before aborting
callLimit: number?, -- maximum active guest call frames across nested calls and coroutines
interruptInterval: number?, -- instruction interval between `interrupt` and `timeout` checks (default `4,096`)
interrupt: (() -> boolean?)?, -- periodic callback; return `false`, yield, or error to abort execution
getGlobal: ((name: string, env: { [any]: any }) -> any)?, -- intercepts global reads (`GETGLOBAL`, unresolved `GETIMPORT`, `_G[k]`)
setGlobal: ((name: string, value: any, env: { [any]: any }) -> ())?, -- intercepts global writes (`SETGLOBAL`, `_G[k] = v`)
safeEnv: boolean?, -- preserve fast paths on unmodified built-in roots present in `env` alongside `getGlobal`
resourceLimits: (ResourceLimits | false)?, -- overrides `env` resource caps (`false` disables caps inherited from `env`)
onCall: ((info: DebugFrameInfo) -> ())?, -- fires when entering a VM closure frame
onReturn: ((info: DebugFrameInfo) -> ())?, -- fires before exiting a VM closure frame
onLine: ((line: number, info: DebugFrameInfo) -> ())?, -- fires when execution advances to a different source line
onBreak: ((line: number, info: DebugFrameInfo) -> ())?, -- fires on `LOP_BREAK` instructions
}Execution environment, resource budget, global hook, and debug hook options for Ouro.load.
CompileResult type
type CompileResult = {
status: "ok" | "parseError" | "compileError",
bytecode: string, -- compiled bytecode, or status-zero encoded error readable via `Bytecode.decodeError`
builder: BytecodeBuilder?,
error: string?,
diagnostics: { Diagnostic },
parseResult: ParseResult,
}Structured result returned by Ouro.compileResult.
SandboxPreset type
type SandboxPreset = "strict" | "balanced" | "trusted"Named safety preset for Ouro.sandbox and Ouro.run.
SandboxPresetConfig type
type SandboxPresetConfig = {
libraries: { string }?, -- stdlib allowlist (`nil` enables all standard libraries)
inheritHost: boolean, -- inherit non-standard host or Roblox globals
allowDirectives: boolean, -- allow `--!optimize`, `--!native`, and `@native` escalation
instructionLimit: number?, -- default VM instruction cap (`nil` for unlimited)
callLimit: number?, -- default active call-frame cap (`nil` for default VM ceiling)
timeout: number?, -- default wall-clock deadline in seconds (`nil` for unlimited)
maxInstructions: number?, -- default compiler bytecode size cap (`nil` for compiler default)
resourceLimits: ResourceLimits?, -- default stdlib, pattern, and memory caps (`nil` for zero wrapper overhead)
}Transparent policy defaults backing each named SandboxPreset in Ouro.PRESETS.
SandboxOptions type
type SandboxOptions = {
preset: SandboxPreset?, -- safety preset: `"strict"`, `"balanced"` (default), or `"trusted"`
globals: { [string]: any }?, -- custom globals and host APIs exposed read-only in the sandbox base environment
libraries: { string }?, -- stdlib allowlist overriding the preset (`"base"`, `"bit32"`, `"buffer"`, `"coroutine"`, `"debug"`, `"math"`, `"os"`, `"string"`, `"table"`, `"utf8"`, `"vector"`)
inheritHost: boolean?, -- inherit non-standard host or Roblox globals (`script` and `loadstring` remain excluded)
readOnly: boolean?, -- lock the sandbox environment read-only so guest scripts cannot assign globals (default `false`)
instructionLimit: (number | false)?, -- maximum VM instructions before aborting (`false` disables preset limit)
callLimit: (number | false)?, -- maximum active guest call frames (`false` disables preset limit)
timeout: (number | false)?, -- wall-clock deadline in seconds (`false` disables preset limit)
interruptInterval: number?, -- instruction interval between `interrupt` and `timeout` checks (default `4,096`)
interrupt: (() -> boolean?)?, -- periodic hook; return `false`, yield, or error to abort execution
resourceLimits: (ResourceLimits | false)?, -- overrides preset stdlib, pattern, and memory caps (`false` disables preset caps)
compile: CompileOptions?, -- compiler defaults merged with `allowDirectives` and preset `maxInstructions`
allowDirectives: boolean?, -- explicit `--!optimize`/`--!native`/`@native` escalation policy overriding the preset
getGlobal: ((name: string, env: { [any]: any }) -> any)?, -- intercepts global reads
setGlobal: ((name: string, value: any, env: { [any]: any }) -> ())?, -- intercepts global writes
safeEnv: boolean?, -- preserve fast paths on unmodified built-in roots alongside `getGlobal`
onCall: ((info: DebugFrameInfo) -> ())?, -- fires when entering a VM closure frame
onReturn: ((info: DebugFrameInfo) -> ())?, -- fires before exiting a VM closure frame
onLine: ((line: number, info: DebugFrameInfo) -> ())?, -- fires when execution advances to a new source line
onBreak: ((line: number, info: DebugFrameInfo) -> ())?, -- fires on `LOP_BREAK` instructions
}Configuration options for Ouro.sandbox and Sandbox:fork.
SandboxLoadOptions type
type SandboxLoadOptions = {
name: string?, -- chunk name for stack traces
mode: LoadMode?, -- `"text"`, `"binary"`, or `"auto"` (defaults `"text"` for strings, `"binary"` for buffers)
decoder: BytecodeDecoder?, -- reverses a custom `CompileOptions.encoder` on binary bytecode
compile: CompileOptions?, -- per-chunk compiler option overrides merged onto the sandbox compile policy
allowDirectives: boolean?, -- overrides the sandbox directive policy for this load
instructionLimit: (number | false)?, -- overrides the sandbox instruction cap (`false` disables)
callLimit: (number | false)?, -- overrides the sandbox call-frame cap (`false` disables)
timeout: (number | false)?, -- overrides the sandbox timeout (`false` disables)
interruptInterval: number?, -- overrides the sandbox interrupt check interval
interrupt: (() -> boolean?)?, -- overrides the sandbox interrupt callback
resourceLimits: (ResourceLimits | false)?, -- overrides the sandbox resource limits (`false` disables)
getGlobal: ((name: string, env: { [any]: any }) -> any)?, -- overrides global read hook
setGlobal: ((name: string, value: any, env: { [any]: any }) -> ())?, -- overrides global write hook
safeEnv: boolean?, -- overrides safe-root fast path policy alongside `getGlobal`
onCall: ((info: DebugFrameInfo) -> ())?, -- overrides frame entry debug hook
onReturn: ((info: DebugFrameInfo) -> ())?, -- overrides frame exit debug hook
onLine: ((line: number, info: DebugFrameInfo) -> ())?, -- overrides source-line debug hook
onBreak: ((line: number, info: DebugFrameInfo) -> ())?, -- overrides `LOP_BREAK` debug hook
}Per-chunk override options for Sandbox:load.
RunOptions type
type RunOptions = {
name: string?, -- chunk name for stack traces
mode: LoadMode?, -- `"text"`, `"binary"`, or `"auto"` (defaults `"text"` for strings, `"binary"` for buffers)
decoder: BytecodeDecoder?, -- reverses a custom `CompileOptions.encoder` on binary bytecode
preset: SandboxPreset?, -- safety preset: `"strict"`, `"balanced"` (default), or `"trusted"`
globals: { [string]: any }?, -- custom globals and host APIs exposed in the sandbox environment
libraries: { string }?, -- stdlib allowlist overriding the preset
inheritHost: boolean?, -- inherit non-standard host or Roblox globals (`script` and `loadstring` remain excluded)
readOnly: boolean?, -- lock the environment read-only so guest scripts cannot assign globals
instructionLimit: (number | false)?, -- maximum VM instructions before aborting (`false` disables preset limit)
callLimit: (number | false)?, -- maximum active guest call frames (`false` disables preset limit)
timeout: (number | false)?, -- wall-clock deadline in seconds (`false` disables preset limit)
interruptInterval: number?, -- instruction interval between `interrupt` and `timeout` checks (default `4,096`)
interrupt: (() -> boolean?)?, -- periodic hook; return `false`, yield, or error to abort execution
resourceLimits: (ResourceLimits | false)?, -- overrides preset stdlib, pattern, and memory caps (`false` disables preset caps)
compile: CompileOptions?, -- compiler defaults merged with `allowDirectives` and preset `maxInstructions`
allowDirectives: boolean?, -- explicit `--!optimize`/`--!native`/`@native` escalation policy overriding the preset
getGlobal: ((name: string, env: { [any]: any }) -> any)?, -- intercepts global reads
setGlobal: ((name: string, value: any, env: { [any]: any }) -> ())?, -- intercepts global writes
safeEnv: boolean?, -- preserve fast paths on unmodified built-in roots alongside `getGlobal`
onCall: ((info: DebugFrameInfo) -> ())?, -- fires when entering a VM closure frame
onReturn: ((info: DebugFrameInfo) -> ())?, -- fires before exiting a VM closure frame
onLine: ((line: number, info: DebugFrameInfo) -> ())?, -- fires when execution advances to a new source line
onBreak: ((line: number, info: DebugFrameInfo) -> ())?, -- fires on `LOP_BREAK` instructions
}Configuration options for one-shot safe execution via Ouro.run.
Sandbox type
type Sandbox = {
preset: SandboxPreset, -- active safety preset (`"strict"`, `"balanced"`, or `"trusted"`)
env: { [any]: any }, -- isolated global environment table owned by this sandbox
readOnly: boolean, -- true when guest global writes and `Sandbox:set` are blocked
allowDirectives: boolean, -- true when `--!optimize`/`--!native`/`@native` escalation is permitted
run: (self: Sandbox, chunk: string | buffer | ProtoModule, ...any) -> (boolean, ...any),
load: (
self: Sandbox,
chunk: string | buffer | ProtoModule,
options: SandboxLoadOptions?
) -> (((...any) -> ...any)?, string?),
compile: (self: Sandbox, source: string | ParseResult, options: CompileOptions?) -> (string?, string?),
fork: (self: Sandbox, overrides: SandboxOptions?) -> Sandbox,
reset: (self: Sandbox) -> (),
get: (self: Sandbox, name: string) -> any,
set: (self: Sandbox, name: string, value: any) -> (),
}Reusable sandbox policy and isolated execution environment created by Ouro.sandbox.
Properties
version Read Only
Ouro.version: stringPackage semantic version string.
luauVersion Re-export
Ouro.luauVersionPinned upstream Luau release version ("0.748").
upstreamRevision Re-export
Ouro.upstreamRevisionPinned upstream Luau Git commit SHA from UPSTREAM.json.
Ast Module
Ouro.Ast: AstLossless AST table serializer (Ast.toTables).
Profiles Module
Ouro.Profiles: ProfilesBuilt-in grammar flag profiles (upstream, studio, experimental) and resolver.
Tokens Module
Ouro.Tokens: TokenImmutable map of token names (Eof, Name, ReservedFunction, ...) to numeric token kinds.
Compiler Module
Ouro.Compiler: CompilerBytecode compiler module (compile, compileResult, compileProto, CompilerFlags).
Bytecode Module
Ouro.Bytecode: BytecodeBytecode codec, disassembler, verifier, and instruction tables.
VM Module
Ouro.VM: VMSandboxed register VM, isolated environments, execution limits, and debug hooks.
Functions
parse
Ouro.parse(source: string, options: ParseOptions?): ParseResultParses a Luau source chunk into an arena-backed ParseResult.
parseExpression
Ouro.parseExpression(source: string, options: ParseOptions?): ParseResultParses a standalone Luau expression into an arena-backed ParseResult.
parseType
Ouro.parseType(source: string, options: ParseOptions?): ParseResultParses a standalone Luau type annotation into an arena-backed ParseResult.
newContext
Ouro.newContext(options: ParseOptions?): ParserContextCreates a reusable ParserContext with pre-validated options, yielding checkpoint lifecycle (busy, reset), and recycled scratch tables.
compile
Ouro.compile(source: string | ParseResult, options: CompileOptions?): (string?, string?)Compiles Luau source or a ParseResult into binary bytecode, returning (bytecode, nil) or (nil, err).
compileResult
Ouro.compileResult(source: string | ParseResult, options: CompileOptions?): CompileResultCompiles Luau source or a ParseResult and returns a structured CompileResult.
load
Ouro.load(chunk: string | buffer | ProtoModule, options: LoadOptions?): (((...any) -> ...any)?, string?)Compiles or deserializes a Luau chunk and loads it into a callable sandboxed VM closure.
run
Ouro.run(chunk: string | buffer | ProtoModule, options: RunOptions?, ...: any): (boolean, ...any)Executes Luau source, binary bytecode, or a ProtoModule inside a fresh safe-by-default sandbox, returning (ok, ...resultsOrErr).
sandbox
Ouro.sandbox(options: SandboxOptions?): SandboxCreates a reusable Sandbox policy and isolated environment handle (:run, :load, :compile, :fork, :reset, :get, :set).