A powerful, generic JavaScript sandbox library designed to expose host APIs to a QuickJS environment with flexible interception and reference management.
This is a monorepo managed with pnpm workspaces.
packages/sandbox: The core sandbox library. This is the main package.packages/communication-protocol: Internal protocol for host-sandbox communication.packages/polyfill: Polyfills for the sandbox environment.examples/demo: A React + Vite demonstration of the sandbox in action, showing remote DOM manipulation.
-
Install dependencies:
pnpm install
-
Build all packages:
pnpm build
-
Run the demo:
cd examples/demo pnpm dev
- QuickJS Based: High-performance, secure JS execution.
- Flexible API Exposure: Easily expose host objects, functions, and state to the sandbox.
- Interception Layer: Fine-grained control over property access and function calls via intersections.
- Reference Tracking: Transparently manage object references between host and guest.