{"id":15036135,"url":"https://github.com/prestonltaylor/jss","last_synced_at":"2026-04-02T02:06:36.305Z","repository":{"id":206052981,"uuid":"709088176","full_name":"PrestonLTaylor/JSS","owner":"PrestonLTaylor","description":"JavaScript Sharp is an in-progress C# JavaScript parser, runtime engine and REPL.","archived":false,"fork":false,"pushed_at":"2024-06-25T14:23:57.000Z","size":696,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T12:14:56.112Z","etag":null,"topics":["csharp","csharp-library","engine","javascript","parser"],"latest_commit_sha":null,"homepage":"https://jssrepl.preston-l-taylor.tech","language":"C#","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/PrestonLTaylor.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}},"created_at":"2023-10-24T01:41:10.000Z","updated_at":"2024-06-25T14:25:37.000Z","dependencies_parsed_at":"2024-04-16T19:30:54.226Z","dependency_job_id":"d9ad11f7-39f5-4121-83f0-bb274fee5df6","html_url":"https://github.com/PrestonLTaylor/JSS","commit_stats":null,"previous_names":["prestonltaylor/jss"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestonLTaylor%2FJSS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestonLTaylor%2FJSS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestonLTaylor%2FJSS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestonLTaylor%2FJSS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrestonLTaylor","download_url":"https://codeload.github.com/PrestonLTaylor/JSS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243401509,"owners_count":20285058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["csharp","csharp-library","engine","javascript","parser"],"created_at":"2024-09-24T20:30:15.880Z","updated_at":"2025-12-29T07:57:16.872Z","avatar_url":"https://github.com/PrestonLTaylor.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSS (JavaScript Sharp)\n\n[![Build and Test JSS](https://github.com/PrestonLTaylor/JSS/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/PrestonLTaylor/JSS/actions/workflows/build-and-test.yml)\n\nJavaScript Sharp is an in-progress C# JavaScript parser, runtime engine and REPL.\n\n## Table of contents\n\n- [Sceenshots](#screenshots)\n- [Usage](#usage)\n  - [CLI](#cli)\n  - [Library](#library)\n- [Building](#building)\n- [Testing](#testing)\n  - [Unit Tests](#unit-tests)\n  - [Test262 Runner](#test262-runner)\n- [License](#license)\n\n# Screenshots\n\n![Screenshot of the JSS CLI](https://i.imgur.com/AjCbgbA.png)\n\n![Screenshot of the JSS Test262 runner](https://i.imgur.com/OOagMem.png)\n\n# Usage\n\n## CLI\n\nThe CLI is used to use the JSS JavaScript engine from your terminal.\n\nThere are two modes for the CLI; the REPL and the file executor.\n\nTo use the repl you execute the JSS executable with no extra command line arguments:\n\n```\nJSS.CLI.exe\n```\n\nTo use the file execute you execute the JSS repl with the the -s/--script argument with the path to the file you wish to execute:\n\n```\nJSS.CLI.exe -s ./path/to/script.js\n```\n\n## Library\n\nJSS also exposes a library that can be used to execute JavaScript code using the JSS engine.\n\nTo execute a script using the JSS engine inside of C#:\n\n```c#\nvar initializeResult = JSS.Lib.Realm.InitializeHostDefinedRealm(out VM vm); // Initializes the realm to execute JavaScript inside of\nvar parser = new JSS.Lib.Parser(SCRIPT_CODE); // Creates a new parser for the script provided\nvar script = parser.Parse(vm); // Returns a script object from the parsed script using the provided vm\nvar scriptResult = script.ScriptEvaluation(CancellationToken.None); // Executes the script\n```\n\nThe VM created by the `InitializeHostDefinedRealm` contains all the variables and functions defined when executing a script. This VM can be used multiple times by different scripts.\n\nThe result returned from `ScriptEvalaution` is a \"Completion\". A completion holds a javascript value and the type of completion it is.\n\n`scriptResult.Value` would be the JavaScript value from executing the script.\n\n# Building\n\nBuilding JSS is simple, you can do it within Visual Studio or by simply executing in the root of the solution:\n\n```\ndotnet build (-c Release or Debug)\n```\n\nThe executables will be located in the bin folders for each project (e.g. JSS/bin/Debug/net7.0/JSS.CLI.exe).\n\n# Testing\n\n## Unit Tests\n\nOur unit test suite comprises of C# unit tests that mainly focus on the the lexing, parsing etc. rather than the runtime. There are a few runtime tests, however, we should ideally move them to their own runtime test suite and use JavaScript files.\n\nTo run these tests simply execute in the root of the solution:\n\n```\ndotnet test\n```\n\n## Test262 Runner\n\nOur test262 runner is for running the [Official ECMAScript Conformance Test Suite](https://github.com/tc39/test262). This gives us access to a comprehensive set of JavaScript test files to test JSS with.\n\nWe also have a [CI job](https://github.com/PrestonLTaylor/JSS/actions/workflows/test-262-runner.yml) for running these tests.\n\nOur test262 runner has two modes, the runner itself and a test run \"differ\"\n\nThe runner executes tests from the test262 test suite and prints its output to the console and to a file in the same directory.\n\nTo execute the runner:\n\n```\nJSS.Test262Runner.exe\n```\n\nThe runner can also filter the tests to execute based on the file path by using the -f flag.\n\nFor example, if you wanted to only run the [tests for undefined](https://github.com/tc39/test262/tree/main/test/built-ins/undefined) where the '\\*' represents a wildcard:\n\n```\nJSS.Test262Runner.exe -f \"./built-ins/undefined/*.js\"\n```\n\nThe differ performs a visual difference between two test run file outputs.\n\nTo execute the differ:\n\n```\nJSS.Test262Runner.exe diff --from \"/path/to/from-test-run.txt\" --to \"/path/to/to-test-run.txt\"\n```\n\nThis will output all the tests that changed between the two test runs. For example, if a test passed and now fails that will show up on the differ.\n\n# License\n\nThis project is licensed under the [MIT License](https://github.com/PrestonLTaylor/JSS/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestonltaylor%2Fjss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprestonltaylor%2Fjss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestonltaylor%2Fjss/lists"}