import type { EdictHostAdapter } from "../codegen/host-adapter.js"; import type { RuntimeState } from "./host-helpers.js"; import type * as binaryen from "../codegen/wasm-encoder.js"; import type { ReplayEntry } from "../codegen/replay-types.js"; export type { BuiltinDef, BuiltinImpl } from "./builtin-types.js"; export { ALL_BUILTINS, BUILTIN_FUNCTIONS, isBuiltin, getBuiltin } from "./builtin-meta.js"; export type { BuiltinFunction } from "./builtin-meta.js"; /** Record mode: log nondeterministic host calls. */ export type ReplayLogRecord = { mode: "record"; entries: ReplayEntry[]; }; /** Replay mode: return pre-recorded values. */ export type ReplayLogReplay = { mode: "replay"; entries: ReplayEntry[]; cursor: { i: number; }; }; /** Combined replay log type. */ export type ReplayLog = ReplayLogRecord | ReplayLogReplay; /** * Create the complete host import object for WASM instantiation. * Iterates all host-kind builtins in the registry and builds a single * flat { host: { ... } } object. * * When a replayLog is provided, builtins tagged `nondeterministic: true` * are automatically wrapped to record or replay their calls. * * @param state — mutable runtime state shared across all host functions. * `state.instance` must be set after `WebAssembly.instantiate()` * but before calling any exported WASM function. * @param adapter — optional platform-specific adapter. Defaults to NodeHostAdapter. * @param replayLog — optional record/replay log for nondeterministic builtins. */ export declare function createHostImports(state: RuntimeState, adapter?: EdictHostAdapter, replayLog?: ReplayLog): Record>; /** * Generate all WASM-native builtin functions (HOFs) from the registry. * Called by codegen.ts after compiling user functions. */ export declare function generateWasmBuiltins(mod: binaryen.Module): void; //# sourceMappingURL=registry.d.ts.map