Repository navigation
Releases: hexplus/pxjs
Releases · hexplus/pxjs
Release list
PXJS 0.1.0
Downloads
| File | What |
|---|---|
pxjs-0.1.0-psp-lib.zip |
libpxjs.a and pxjs.h, to embed PXJS in PSP homebrew. Link with -lpxjs -lpsprtc -lm. |
pxjs-0.1.0-psp-runner.zip |
An EBOOT that runs main.js from its own folder and shows what it prints. Copy the PSP folder to the Memory Stick (custom firmware, or PPSSPP), replace main.js with your script. |
pxjs-0.1.0-linux-i386.tar.gz |
The pxjs command-line runner, a static 32-bit Linux binary: ./pxjs file.js. |
The packages were built from b8eba50, which adds the packaging (psp/, tools/release.sh) to this tag; the engine source is the same.
The first release.
The engine
- Strict-mode ECMAScript 2023, written from scratch in C (about 28k lines), with no dependencies beyond libc and libm.
- Test262: 34,054 of 34,460 applicable ES2023 tests pass (98.8%), on the pinned commit
7ab7fafa. The exclusions made by design are listed in docs/compatibility.md. - Values: one 32-bit word each; 31-bit integers without allocation.
- Memory: one fixed heap arena and a non-moving mark-sweep collector without C recursion. Out of memory is a catchable error: every allocation site reached by the test suite was failed in turn, under ASan, and recovered.
- Compiler and VM: a single-pass compiler to bytecode; JavaScript calls do not recurse in C; inline caches, including for primitive receivers; fused compare-and-branch instructions.
- Numbers: exact conversions in both directions (shortest round-trip digits, correctly rounded parsing) without printf, checked against exact references.
- RegExp with lookbehind, named groups and Unicode property escapes (tables generated from Unicode 17.0); backtracking is bounded, so a catastrophic pattern throws instead of hanging.
- Web extras:
structuredClone,atob/btoa,TextEncoder/TextDecoder, andURL/URLSearchParams(all 1,174 cases of the Web Platform Tests' URL data).
The embedding API
include/pxjs.h: values and objects, native functions with bound data, handles and roots, typed-array bytes, finalizers, modules with a host resolver, jobs and promises for native async work, a rejection tracker, an interrupt hook (which may throw its own error), an out-of-memory handler, and memory statistics.
Platforms
- Sony PSP (MIPS Allegrex), built with PSPDEV: tested in PPSSPP and on a PSP-1000 (firmware 6.61) as the engine of PSPX.
- 32-bit x86 hosts (
-m32), for development and testing, with ASan, UBSan and a GC-stress mode.
Not supported
By design: sloppy mode, eval and new Function, BigInt, Intl, SharedArrayBuffer and Atomics. The known deviations from the specification are listed in docs/engine-audit.md.