JavaScript: vectorcraft-js runs ES5 scripts with a garbage-collected heap and execution limits

Squashed from #6178 onto main.
This commit is contained in:
dotCooCoo
2026-11-09 00:29:52 +07:00
committed by bflatastic
parent 581ced3213
commit bf1145edd5
17 changed files with 6501 additions and 26 deletions
+4 -2
View File
@@ -43,7 +43,8 @@ commands:
pack PNGs into a Windows .ico (used by packaging/icons.sh)
stats [--exact] count tests and lines per crate (--exact: ask the test harness via `-- --list`)
test262 fetch the pinned ECMAScript conformance suite into corpus/test262 (sha256
verified) and parse its ES5 subset with vectorcraft-js, printing the counts
verified), parse its ES5 subset with vectorcraft-js and run the ES5 language
tests its interpreter supports, printing the counts
web-fonts copy the craft-fonts faces in crates/text/web-fonts.txt into the web site (the Trunk
post_build hook; a no-op without CRAFT_FONTS_DIR)
";
@@ -338,7 +339,8 @@ Tests that use a corpus skip cleanly when it is absent.
corpus/affinity/ public Affinity documents (CC0/MIT/Apache-2.0) at pinned commits, sha256
verified: oracles for the Affinity reader. Fetch: cargo xtask corpus --affinity
corpus/test262/ the ECMAScript conformance suite (BSD-3-Clause) at a pinned commit, sha256
verified: the JavaScript parser's ES5 subset. Fetch and run: cargo xtask test262
verified: the JavaScript parser's and interpreter's ES5 subsets. Fetch and run:
cargo xtask test262
",
corpus.display()
);
+2 -1
View File
@@ -1,7 +1,8 @@
//! `cargo xtask test262`: the official ECMAScript conformance suite (https://github.com/tc39/test262,
//! BSD-3-Clause) at a pinned commit, fetched as GitHub's archive of that commit, checked against
//! its SHA-256 and size, and unpacked into `corpus/test262/` (gitignored, never committed). It then
//! runs `vectorcraft-js`'s `test262` test, which parses the ES5 parse subset and prints its counts.
//! runs `vectorcraft-js`'s `test262` tests, which parse the ES5 parse subset, run the ES5
//! `test/language` tests that need only the interpreter's built-ins, and print each one's counts.
//!
//! Moving the pin: change [`COMMIT`], run the command once with the new commit to see the
//! archive's SHA-256 in the error, check the archive, and update [`SHA256`].