Function: createCompartmentRuntime()
ts
function createCompartmentRuntime(
globals: Record<string, (...args: unknown[]) => unknown>,
limits: GuestLimits,
modules?: Record<string, unknown>,
): Promise<{
evaluate: Promise<GuestOutcome>;
kill: Promise<void>;
}>;Defined in: src/batteries/sandbox/js/compartment.ts:24
Construct a minimal SES-backed in-process guest. The runtime boundary is intentionally explicit.
Parameters
| Parameter | Type |
|---|---|
globals | Record<string, (...args: unknown[]) => unknown> |
limits | GuestLimits |
modules | Record<string, unknown> |
Returns
Promise<{ evaluate: Promise<GuestOutcome>; kill: Promise<void>; }>