{"id":48509074,"url":"https://github.com/pmatos/jsse","last_synced_at":"2026-04-07T17:01:54.238Z","repository":{"id":334923791,"uuid":"1143377769","full_name":"pmatos/jsse","owner":"pmatos","description":"An agent-coded JS engine in Rust. I didn't touch a single line of code here. Not one. This repo is a write-only data store. I didn't even create this repo by hand -- my agent did that.","archived":false,"fork":false,"pushed_at":"2026-03-26T19:07:05.000Z","size":19447,"stargazers_count":28,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T05:47:49.881Z","etag":null,"topics":["engine","javascript","js"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmatos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-27T14:05:15.000Z","updated_at":"2026-03-27T05:29:25.000Z","dependencies_parsed_at":"2026-02-26T06:11:10.581Z","dependency_job_id":null,"html_url":"https://github.com/pmatos/jsse","commit_stats":null,"previous_names":["pmatos/jsse"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pmatos/jsse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fjsse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fjsse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fjsse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fjsse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmatos","download_url":"https://codeload.github.com/pmatos/jsse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fjsse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31520577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["engine","javascript","js"],"created_at":"2026-04-07T17:01:51.295Z","updated_at":"2026-04-07T17:01:54.227Z","avatar_url":"https://github.com/pmatos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsse\n\nAn agent-coded JS engine in Rust. I didn't touch a single line of code here. Not one. This repo is a write-only data store. I didn't even create this repo by hand -- my agent did that.\n\n**Goal: 100% test262 pass rate.**\n\n## Test262 Progress\n\n| Test Files | Scenarios | Passing | Failing | Pass Rate |\n|------------|-----------|---------|---------|-----------|\n| 51,525     | 99,020    | 99,020  | 0       | 100.00%   |\n\nCovers `language/`, `built-ins/`, `annexB/`, and `intl402/`.\n\n**Staging tests** (not included above): 2,762 / 2,808 (98.36%). Staging failures include flaky timeouts, libm precision gaps, and a [spec-compliance conflict](https://github.com/pmatos/jsse/issues/36) with AnnexB arguments hoisting.\n\nPer the test262 specification ([INTERPRETING.md](https://github.com/tc39/test262/blob/main/INTERPRETING.md)), test files without `noStrict`, `onlyStrict`, `module`, or `raw` flags must be run **twice**: once in default (sloppy) mode and once with `\"use strict\";` prepended. Our test runner implements this dual-mode execution.\n\n*ES Modules now supported with dynamic `import()` and `import.meta`. Async tests run with Promise/async-await support.*\n\n## Structure\n\n- `spec/` — ECMAScript specification (submodule from [tc39/ecma262](https://github.com/tc39/ecma262))\n- `test262/` — Official test suite (submodule from [tc39/test262](https://github.com/tc39/test262))\n- `tests/` — Additional custom tests\n- `scripts/` — Test runner and tooling\n\n## Supported Features\n\n- CLI with file execution, `--eval`/`-e` inline evaluation, and REPL mode\n- `--version` and `--help` flags\n- Exit codes: 0 (success), 1 (runtime error), 2 (syntax error)\n- Lexer: all ES2024 tokens, keywords, numeric/string/template literals, Unicode identifiers\n- Parser: recursive descent, all statements, expressions, destructuring, arrow functions, classes, private fields, strict mode\n- Interpreter: tree-walking execution with environment chain scoping\n  - Variable declarations (`var`, `let`, `const` with TDZ, `using`, `await using`)\n  - Explicit Resource Management (`using`/`await using` declarations, `DisposableStack`, `AsyncDisposableStack`, `SuppressedError`, `Symbol.dispose`, `Symbol.asyncDispose`)\n  - Control flow (`if`, `while`, `do-while`, `for`, `for-in`, `for-of`, `for-await-of`, `switch`, `try/catch/finally`)\n  - Functions (declarations, expressions, arrows, closures)\n  - Classes (declarations, expressions, inheritance, `super`, static methods/properties, private fields, private methods, private accessors, `#x in obj` brand checks)\n  - Operators (arithmetic, comparison, bitwise, logical, assignment, update, typeof, void)\n  - Objects and arrays (literals, member access, computed properties)\n  - Template literals (including tagged templates)\n  - `String.raw`\n  - `new` operator with prototype chain setup\n  - `new.target` meta-property\n  - `this` binding (method calls, constructors, arrow lexical scoping)\n  - Property descriptors (data properties with writable/enumerable/configurable)\n  - Prototype chain inheritance (Object.prototype on all objects)\n  - Getter/setter support (object literals, classes, `Object.defineProperty`)\n  - `Object.defineProperty`, `Object.getOwnPropertyDescriptor`, `Object.getOwnPropertyDescriptors`, `Object.defineProperties`, `Object.keys`, `Object.freeze`, `Object.getPrototypeOf`, `Object.setPrototypeOf`, `Object.create`, `Object.entries`, `Object.values`, `Object.assign`, `Object.is`, `Object.getOwnPropertyNames`, `Object.getOwnPropertySymbols`, `Object.groupBy`, `Object.preventExtensions`, `Object.isExtensible`, `Object.isFrozen`, `Object.isSealed`, `Object.seal`, `Object.hasOwn`, `Object.fromEntries`\n  - `Function.prototype.call`, `Function.prototype.apply`, `Function.prototype.bind`\n  - `Object.prototype.hasOwnProperty`, `Object.prototype.toString`, `Object.prototype.valueOf`, `Object.prototype.propertyIsEnumerable`, `Object.prototype.isPrototypeOf`, `Object.prototype.__defineGetter__`, `Object.prototype.__defineSetter__`, `Object.prototype.__lookupGetter__`, `Object.prototype.__lookupSetter__`\n  - Number/Boolean primitive method calls (`toString`, `valueOf`, `toFixed`)\n  - `instanceof` and `in` operators\n  - ToPrimitive with valueOf/toString coercion for objects\n  - Wrapper objects (`new Boolean`, `new Number`, `new String`) with primitive value\n  - `eval()` support\n  - `Function`, `GeneratorFunction`, `AsyncFunction`, `AsyncGeneratorFunction` constructors (dynamic function creation)\n  - `Symbol` with well-known symbols (iterator, hasInstance, toPrimitive, etc.)\n  - `delete` operator for object properties\n  - Iterator protocol (`Symbol.iterator`, lazy `ArrayIterator`, `StringIterator`)\n  - `Array.prototype.values()`, `.keys()`, `.entries()`, `[@@iterator]()` returning lazy iterators\n  - `String.prototype[@@iterator]()` with Unicode code point iteration\n  - Spread elements in arrays and function calls (iterator-protocol aware)\n  - Rest parameters in function declarations\n  - Destructuring (array and object patterns, iterator-protocol aware)\n  - RegExp literals and `RegExp` constructor with `test`, `exec`, `toString`\n  - Array prototype methods (`push`, `pop`, `shift`, `unshift`, `indexOf`, `lastIndexOf`, `includes`, `join`, `toString`, `concat`, `slice`, `splice`, `reverse`, `fill`, `forEach`, `map`, `filter`, `reduce`, `reduceRight`, `some`, `every`, `find`, `findIndex`, `findLast`, `findLastIndex`, `sort`, `flat`, `flatMap`, `at`)\n  - `Array.isArray`, `Array.from`, `Array.of`\n  - String prototype methods (`charAt`, `charCodeAt`, `indexOf`, `lastIndexOf`, `includes`, `startsWith`, `endsWith`, `slice`, `substring`, `toLowerCase`, `toUpperCase`, `trim`, `trimStart`, `trimEnd`, `repeat`, `padStart`, `padEnd`, `concat`, `split`, `replace`, `replaceAll`, `at`, `search`, `match`)\n  - Proper Error objects (`TypeError`, `ReferenceError`, `SyntaxError`, `RangeError`) with prototype chains and `instanceof` support\n  - `JSON.stringify` (replacer function/array, space/indent, toJSON, circular detection, BigInt TypeError, wrapper unwrapping), `JSON.parse` (reviver), `JSON.rawJSON`, `JSON.isRawJSON`\n  - `String.fromCharCode`\n  - `Map` built-in (constructor, `get`, `set`, `has`, `delete`, `clear`, `size`, `entries`, `keys`, `values`, `forEach`, `@@iterator`, `Map.groupBy`)\n  - `Set` built-in (constructor, `add`, `has`, `delete`, `clear`, `size`, `entries`, `keys`, `values`, `forEach`, `@@iterator`, ES2025 set methods: `union`, `intersection`, `difference`, `symmetricDifference`, `isSubsetOf`, `isSupersetOf`, `isDisjointFrom`)\n  - Generator functions (`function*`, `yield`, `yield*`) with replay-based execution\n  - Generator prototype (`next`, `return`, `throw`, `Symbol.iterator`, `Symbol.toStringTag`)\n  - ES Modules (`import`, `export`, `import()`, `import.meta`, top-level await)\n  - `ArrayBuffer` (constructor, `byteLength`, `slice`, `isView`)\n  - TypedArrays (`Int8Array`, `Uint8Array`, `Uint8ClampedArray`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `Float32Array`, `Float64Array`, `BigInt64Array`, `BigUint64Array`) with indexed access, prototype methods (`at`, `set`, `subarray`, `slice`, `copyWithin`, `fill`, `indexOf`, `lastIndexOf`, `includes`, `find`, `findIndex`, `findLast`, `findLastIndex`, `forEach`, `map`, `filter`, `reduce`, `reduceRight`, `every`, `some`, `reverse`, `sort`, `join`, `toString`, `toReversed`, `toSorted`, `entries`, `keys`, `values`, `from`, `of`)\n  - `DataView` (constructor, all get/set methods for Int8 through BigUint64, little/big endian)\n  - `Temporal` (all types: `Instant`, `ZonedDateTime`, `PlainDateTime`, `PlainDate`, `PlainTime`, `PlainYearMonth`, `PlainMonthDay`, `Duration`, `Temporal.Now`; full arithmetic, comparison, rounding, formatting; IANA timezone support via ICU4X; 12 calendar systems; 100% test262 + intl402/Temporal compliance)\n  - `Intl.DateTimeFormat` (partial — dateStyle/timeStyle, calendar-aware Temporal formatting)\n  - `Intl.NumberFormat` (partial)\n  - `ShadowRealm` (constructor, `evaluate`, `importValue`; full cross-realm value wrapping with WrappedFunction exotic objects)\n  - `globalThis`\n  - Built-ins: `console.log`, `Error`, `Test262Error`, `$DONOTEVALUATE$`\n\n## Building \u0026 Running\n\n```bash\ncargo build --release\n./target/release/jsse \u003cfile.js\u003e\n./target/release/jsse -e \"1 + 1\"\n./target/release/jsse              # starts REPL\n```\n\n## Running test262\n\n```bash\ncargo build --release\nuv run python scripts/run-test262.py\n```\n\nOptions: `-j \u003cn\u003e` for parallelism (default: nproc/2), `--timeout \u003cs\u003e` (default: 120).\n\nThe runner supports multiple engines via `--engine`:\n\n```bash\nuv run python scripts/run-test262.py --engine jsse      # default\nuv run python scripts/run-test262.py --engine node --binary /path/to/node\nuv run python scripts/run-test262.py --engine boa --binary /path/to/boa\n```\n\nPer-test timing data is written to `/tmp/timing-{engine}.json` after each run.\n\n## Engine Comparison (test262)\n\nBenchmark run on 2026-03-10 using `scripts/run-test262.py -j 64 --timeout 120` on a 128-core machine. All three engines ran the same test262 checkout (commit at `test262/`) with the same harness, timeout, and scenario expansion.\n\n| Engine | Version | Scenarios | Run | Skip | Pass | Fail | Rate |\n|--------|---------|-----------|-----|------|------|------|------|\n| **JSSE** | latest | 101,234 | 101,234 | 0 | 101,044 | 190 | **99.81%** |\n| **Boa** | v0.21 | 91,986 | 91,986 | 0 | 83,260 | 8,726 | **90.51%** |\n| **Node** | v25.8.0 | 91,986 | 91,187 | 799 | 79,201 | 11,986 | **86.86%** |\n\n### Failure breakdown\n\n| Category | Node v25.8.0 | Boa v0.21 |\n|----------|-------------|-----------|\n| Temporal | 8,980 | 0 |\n| Atomics/agent | 236 | 0 |\n| Dynamic import | 162 | 594 |\n| RegExp property escapes | — | 284 |\n| Class elements/destructuring | — | 960+ |\n| AssignmentTargetType | — | 608 |\n\n### Caveats\n\n- **Node**: 75% of its failures are Temporal (not shipped in Node 25). Module tests (799 scenarios) are skipped — the adapter can't run ES modules via Node. Some Atomics agent tests time out due to the basic `$262.agent` prelude. Node runs under a 4GB `RLIMIT_AS` (V8 requires ~2GB to start).\n- **Boa**: Main gaps are parser-level (assignment target validation, class destructuring, regexp property escapes). Temporal and Atomics tests pass (Boa handles them internally).\n- **JSSE**: Full pass across all categories including Temporal, Atomics, modules, and staging tests.\n\n### Reproducing the comparison\n\n**Prerequisites:**\n- Rust nightly toolchain\n- Python 3.10+ with [uv](https://github.com/astral-sh/uv)\n- `test262/` submodule initialized (`git submodule update --init`)\n\n**1. Build JSSE:**\n```bash\ncargo build --release\n```\n\n**2. Download Node.js v25.8.0:**\n```bash\ncurl -sL \"https://nodejs.org/dist/v25.8.0/node-v25.8.0-linux-x64.tar.xz\" \\\n  | tar -xJ -C /tmp/\n# Binary: /tmp/node-v25.8.0-linux-x64/bin/node\n```\n\n**3. Download Boa v0.21:**\n```bash\ncurl -sL \"https://github.com/boa-dev/boa/releases/download/v0.21/boa-x86_64-unknown-linux-gnu\" \\\n  -o /tmp/boa-v0.21\nchmod +x /tmp/boa-v0.21\n```\n\n**4. Run each engine** (sequentially to avoid resource contention):\n```bash\n# JSSE (~15-20 min at -j 64)\nuv run python scripts/run-test262.py -j 64\n\n# Node v25.8.0 (~10 min at -j 64)\nuv run python scripts/run-test262.py --engine node \\\n  --binary /tmp/node-v25.8.0-linux-x64/bin/node -j 64\n\n# Boa v0.21 (~5 min at -j 64)\nuv run python scripts/run-test262.py --engine boa \\\n  --binary /tmp/boa-v0.21 -j 64\n```\n\nResults are printed to stdout. Per-test timing JSON is written to `/tmp/timing-{engine}.json`. Pass/fail lists are written to `test262-pass-{engine}.txt` and `/tmp/test262-fail-{engine}.txt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmatos%2Fjsse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmatos%2Fjsse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmatos%2Fjsse/lists"}