Rhino is an open source (MPL 2.0) JavaScript engine, implemented in Java 17. The build system used is gradle, via the gradle wrapper (./gradlew). There are no external dependencies, except for JUnit for unit tests.
./gradlew build./gradlew test./gradlew spotlessApply./gradlew checkrhino or tests; search for existing tests to make a decision on a case-by-case basis.The code base is organized in multiple modules. Most changes will go into the rhino or tests modules. Refer to README.md for the full list.
rhino: The primary codebase necessary and sufficient to run JavaScript coderhino-tools: Contains the shell, debugger, and the “Global” object, which many tests and other Rhino-based tools usetests: The tests that depend on all of Rhino and also the external tests, including the Mozilla legacy test scripts and the test262 testsRhino follows a classical architecture:
ScriptRuntime is the main class for all runtime methods, shared between compiled classes and interpreter.
Builtins such as Object or Array are implemented in NativeObject, NativeArray, etc.