Original text(via Hacker News)
Scope and compliance matrix
A clear accounting of what is and is not supported.
NormalScript® is a small embeddable virtual machine for a subset of JavaScript, not a full runtime such as Node, Bun, or a browser. Whatever a script needs from outside, the host passes in. The omissions below keep it small.
Supported
- Host runtimes: Node ≥ 24 or Bun ≥ 1.4.
- Syntax: let and const, destructuring, spread, arrow, async, and generator functions, async generators and for await, classes (fields, static members, getters and setters, extends, super), object literal getters and setters, labels, try/finally, and top-level await and return. Unsupported syntax fails before the script runs, with a hint.
- Built-ins: Object, Array, String, Number, BigInt, Math, JSON, Date, RegExp, Map, Set, WeakMap, WeakSet, Promise, Iterator helpers, and errors.
- Pure-data helpers: URL, URLSearchParams, Headers, TextEncoder/TextDecoder, atob/btoa, structuredClone, crypto.randomUUID/getRandomValues, Uint8Array, Node's Buffer, and console.
- Imports: import and require bind host globals by module name before the script runs.
- Host function options: type is sync (the default), async, or sync-thenable. idempotent permits a suspend mid-call. constructible allows new. takesFunctions accepts functions the host returned earlier. snapshot keeps functions in results across a resume.
- Argument translation: A script function or promise inside a host argument fails the call by default. The translate option can drop functions and await promises instead.
- Conformance: test262 at pinned revision 250f204f, excluding features out of scope by design. Of 22,253 files kept, 19,408 pass and 2,845 are skipped as known gaps. None fail. Not yet run in CI.
Not supported
- Timers and event loop: No setTimeout, setInterval, setImmediate, or queueMicrotask, and no background event loop. A script runs its top-level body to completion and exits. Un-awaited promises and in-flight host calls still pending are interrupted.
- Runtime and I/O APIs: No fetch, fs, process, AbortController, EventTarget, Request/Response/Blob, WebSocket, Worker, crypto.subtle, Intl, or DOM. The host passes in whatever a script needs.
- Module loader and export: import and require only bind host globals and configured module aliases. Scripts do not load files or packages from disk. export is a syntax error.
- Script functions as host arguments: Not yet. Arguments are copied across the boundary, so callbacks cannot be passed to host functions today. Support is planned for a future release. Host objects are not classes.
- Dynamic code and sloppy mode: eval, new Function(...), with, and non-strict mode.
- Metaprogramming: Object.setPrototypeOf, __proto__ assignment, __defineGetter__/__defineSetter__, Proxy, and Reflect.
- Class features: Private members (#x), static blocks, and new on plain functions. Only classes and host functions marked constructible can be constructed.
- Symbols: Symbol(). Only Symbol.iterator, Symbol.asyncIterator, Symbol.toPrimitive, and Symbol.toStringTag exist.
- Binary and weak references: Typed arrays other than Uint8Array, ArrayBuffer, DataView, WeakRef, and FinalizationRegistry.
- TypeScript syntax: Scripts must be plain JavaScript.