/** * FFI-backed `Isolate` implementation. Calls libJavaScriptCore directly via * `bun:ffi` — no Worker, no message-passing. Replaces the v0.1 Worker * backend on platforms where libJSC is reachable (macOS always; Linux * with libjavascriptcoregtk installed). Same public API surface. * * Phase 1 (this file): core eval path + value marshalling + harden + * watchdog (CPU + heap). References use a JSClassCreate-backed function * with private data carrying a refId; the host side maintains the lookup * table. Snapshot reads sandbox own-property names via * `JSObjectCopyPropertyNames` and JSON-round-trips each. * * Eval boundary trade-off vs Worker: timeouts here use * `JSContextGroupSetExecutionTimeLimit`, which throws a * `TerminationException` *into the script's stack*. The isolate keeps * running — strictly better than v1's "the whole isolate dies on timeout." * * Hardening trade-off: `JSGlobalContextSetEvalEnabled(ctx, false, msg)` * closes the two T2 documented residuals (`(0, eval)('Bun')` and `new * Function('return Bun')()`) at the cost of disabling eval/Function entirely * for that context. We disable when `harden !== false`. */ import { type Isolate, type IsolateOptions } from "../types"; export declare const createIsolateFfi: (options?: IsolateOptions) => Promise;