Skip to main content

@enclave-vm/runtime

Standalone runtime worker for EnclaveJS that can be deployed separately from the broker. Enables distributed execution, serverless deployments, and horizontal scaling.

Installation

Quick Start

CLI Usage

Programmatic Usage

Architecture

The runtime worker receives code execution requests from a broker via WebSocket and runs them in isolated enclave-vm instances.
Why separate runtime?
  • Process Isolation: Code execution in a separate process
  • Horizontal Scaling: Run multiple runtime workers
  • Serverless: Deploy as Lambda/Cloud Functions
  • Resource Management: Dedicated resources for execution

Runtime Configuration

Runtime Worker API

Runtime Stats

Session Executor

Lower-level API for executing code within the runtime.

Communication Channels

Memory Channel (Testing)

WebSocket Channel

Channel State

Broker Configuration

Configure the broker to use an extracted runtime:

Docker Deployment

Dockerfile

Docker Compose

AWS Lambda Deployment

Runtime Request Types

Event Handling

Connection Handling