architecture
Execution modes and engine scope
Why Boomkat targets ECMA-262 instead of a specific host runtime, and how strict, sloppy, module, and TypeScript modes interact.
Engine, not a runtime
Boomkat's target is ECMA-262 (with optional ECMA-402 Intl and Temporal). It does not ship a Node.js or browser API surface; a host links the engine and supplies its own I/O, timers, module loader, and globals.
Strict mode, sloppy mode, and modules
Strictness is tracked per function. Classic scripts, ordinary function bodies, and dynamic Function() bodies default to sloppy mode unless raised by a "use strict" prologue.
ES modules and class bodies are always strict.
The CLI evaluates files as ES modules by default; pass --script for classic script semantics.
In the C API, bk_eval runs a sloppy script, while bk_eval_ex with BK_EVAL_STRICT selects strict script mode.
Following TypeScript 7, .ts files are always strict even without a prologue.
Realms and agents
A bk_ctx is an ECMAScript realm with its own global object and intrinsics. Multiple realms in the same bk_runtime share a heap and exchange values directly.
An agent is a thread running its own runtime; agents share only SharedArrayBuffer data blocks, coordinated through Atomics.wait, Atomics.notify, and Atomics.waitAsync.
Deliberate exclusions
Legacy Annex B features needed for sloppy compatibility are implemented, while obsolete web-only additions such as String.prototype HTML methods and legacy RegExp statics are omitted.
Stage 3 proposals are added as Test262 stabilizes them; explicit resource management (using / await using) is included, while Decorators and ShadowRealm are not yet implemented.