2015-2016 senior design project by Terry Sun and Saghm Rossi, in collaboration with David Mally (for his Master's Thesis) and Professor Steve Zdancewic.
The parser is currently defined in a secondary package at rustoscript/js.rs-parser, and the AST is defined at rustoscript/js.rs-common. The garbage collection engine is implemented by David Mally at rustoscript/french-press.
Build and run with Cargo. By default, this opens a REPL.
cargo build cargo run
You can pass in a JS file to evaluate code from a file.
cargo run <file>
Run the Sputnik test suite:
cargo run -- --test
Js.rs was tested using Google's Sputnik, an ECMAScript 5 conformance test suite. Sputnik defines several categories of tests, each with various depths of subcategories (e.g., the "Expressions" category looks like this:
11_Expressions/ ├── 11.3_PostfixExpressions │ ├── 11.3.1_Postfix_Increment_Operator │ │ ├── S11.3.1_A1.1_T1.js (a single test) │ │ ├── S11.3.1_A1.1_T2.js │ │ ├── ...
Sputnik provides a total of 2427 distinct tests. Js.rs passes 18.2% of those tests.