🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@executor-js/runtime-quickjs

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@executor-js/runtime-quickjs

[QuickJS](https://github.com/justjake/quickjs-emscripten) sandbox runtime for `@executor-js/execution`. Runs untrusted TypeScript/JavaScript in a WASM-backed interpreter with configurable timeout, memory limit, and stack size — safe enough to execute LLM-

latest
Source
npmnpm
Version
1.4.29
Version published
Maintainers
1
Created
Source

@executor-js/runtime-quickjs

QuickJS sandbox runtime for @executor-js/execution. Runs untrusted TypeScript/JavaScript in a WASM-backed interpreter with configurable timeout, memory limit, and stack size — safe enough to execute LLM-generated code that calls your registered tools.

Install

bun add @executor-js/execution @executor-js/runtime-quickjs
# or
npm install @executor-js/execution @executor-js/runtime-quickjs

Usage

Pass a makeQuickJsExecutor() as the codeExecutor when building the execution engine:

import { createExecutor } from "@executor-js/sdk";
import { createExecutionEngine } from "@executor-js/execution";
import { makeQuickJsExecutor } from "@executor-js/runtime-quickjs";

const executor = await createExecutor({ onElicitation: "accept-all" });

const engine = createExecutionEngine({
  executor,
  codeExecutor: makeQuickJsExecutor({
    timeoutMs: 2_000,
    memoryLimitBytes: 32 * 1024 * 1024,
    maxStackSizeBytes: 1 * 1024 * 1024,
  }),
});

Options

OptionDefaultDescription
timeoutMs300_000Max wall-clock time per execution
memoryLimitBytes64 * 1MBMax memory the VM can allocate
maxStackSizeBytes1 * 1MBMax call-stack depth

Swapping the QuickJS build

import { setQuickJSModule } from "@executor-js/runtime-quickjs";
import { newQuickJSWASMModule } from "quickjs-emscripten";

setQuickJSModule(await newQuickJSWASMModule());

Use this when you want a different WASM variant (e.g. debug builds, QuickJS-NG) than the default bundled one. newQuickJSWASMModule() defaults to the release-sync variant; pass a different @jitl/quickjs-* variant to swap it.

Status

Pre-1.0. APIs may still change between beta releases. Part of the executor monorepo.

License

MIT

FAQs

Package last updated on 14 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts