# ErosZy/sablejs

Run user plugins, rules, formulas, and AI-generated JavaScript safely in browsers.

Repository: https://github.com/ErosZy/sablejs
Canonical: https://ross.abutalabs.com/products/sablejs
Language: JavaScript
License: Apache-2.0
License Family: permissive
Topics: sandbox, javascript, aot, browser, web-worker
Last push: 2026-08-25T13:36:22+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 2168, "days_push": 8, "days_rel": 8, "gap_med": 0, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1124, forks 53 (observed 2026-08-28T04:03:40.623464+00:00)

## What it is
sablejs is a JavaScript sandbox library that safely executes untrusted, user-authored, or AI-generated JavaScript by AOT-compiling ES5.1 programs to host JavaScript instead of running an embedded VM. It provides data copying, explicit capabilities, source maps, and single-run disposable instances for browser, Worker, and Node environments.

## Use cases
- run user-submitted JavaScript plugins safely in the browser
- execute AI-generated JavaScript code in a sandbox
- sandbox untrusted scripts in a web worker with timeouts
- precompile and cache sandboxed scripts at build time
- replace QuickJS-WASM with a faster JS sandbox
- run user-defined rules or formulas securely

## When to choose
- you need to execute untrusted or generated JavaScript with strong host isolation
- you want sandboxed JS execution without the overhead of a WASM VM
- you need debuggable sandboxed code with source maps
- you run user plugins, rules, or formulas in browser or Node

## When to avoid
- you need to run modern ES6+ JavaScript directly without downleveling via Babel or SWC
- you need full ECMAScript spec compliance or module imports inside the sandbox
- you need long-lived, multi-run sandboxed execution contexts
- you need a general-purpose JavaScript runtime rather than a sandbox

## Facets
- artifact type: library
- maturity: active
- function: interpreter, security, compiler
- domain: developer-tools, web-development, security
- platform: browser, cli
- tags: javascript-sandbox, aot-compilation, quickjs-alternative, untrusted-code-execution, plugin-sandbox, source-maps, web-worker-isolation, sandbox, javascript, nodejs, web-server

## Member repositories
- ErosZy/sablejs (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:40.623464+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:39:36.847838+00:00, confidence not recorded.
  - readme: https://github.com/ErosZy/sablejs (fetched 2026-08-28T04:03:40.623464+00:00, sha c78c1965b8ce)
- Data as of 2026-08-30T08:39:29.467469+00:00.
