{"id":26186565,"url":"https://github.com/lynx-family/primjs","last_synced_at":"2026-05-22T06:01:18.085Z","repository":{"id":280636953,"uuid":"942367410","full_name":"lynx-family/primjs","owner":"lynx-family","description":"JavaScript Engine Optimized for Lynx","archived":false,"fork":false,"pushed_at":"2025-03-11T19:31:25.000Z","size":2472,"stargazers_count":686,"open_issues_count":5,"forks_count":20,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-03-11T20:24:38.301Z","etag":null,"topics":["javascript","virtual-machine"],"latest_commit_sha":null,"homepage":"https://lynxjs.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lynx-family.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-04T02:10:17.000Z","updated_at":"2025-03-11T20:05:25.000Z","dependencies_parsed_at":"2025-03-04T14:35:23.457Z","dependency_job_id":null,"html_url":"https://github.com/lynx-family/primjs","commit_stats":null,"previous_names":["lynx-family/primjs"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynx-family%2Fprimjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynx-family%2Fprimjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynx-family%2Fprimjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynx-family%2Fprimjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lynx-family","download_url":"https://codeload.github.com/lynx-family/primjs/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243126775,"owners_count":20240486,"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":["javascript","virtual-machine"],"created_at":"2025-03-11T23:22:34.863Z","updated_at":"2026-05-22T06:01:18.080Z","avatar_url":"https://github.com/lynx-family.png","language":"C++","funding_links":[],"categories":["Lynx Family","C++","javascript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cp\u003e\n  \u003ca href=\"https://lynxjs.org/guide/scripting-runtime/main-thread-runtime.html#primjs\"\u003e\n    \u003cimg width=\"500\" alt=\"PrimJS logo\" src=\".github/splash.png\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.txt)\n\nPrimJS is a lightweight, high-performance JavaScript engine designed specifically for the [Lynx](https://github.com/lynx-family/lynx) cross-platform framework. Fully supporting ES2019, PrimJS is built on top of [QuickJS](https://bellard.org/quickjs/) and delivers superior performance and a better development experience compared to QuickJS. \n\n\u003c/div\u003e\n\n## Key features include:\n- **[Optimized Interpreter](./docs/template_interpreter.md):** PrimJS introduces a template interpreter leveraging stack caching and register optimizations, significantly enhancing performance.\n- **Seamless Object Model Integration:** The engine's object model integrates efficiently with the Lynx object model, reducing data communication overhead and improving rendering performance.\n- **[Advanced Memory Management](./docs/gc.md):** Utilizing a Garbage Collector (GC) instead of QuickJS's Reference Counting, PrimJS offers better performance, improved memory analyzability, and reduced risk of memory leaks.\n- **[Comprehensive Debugging Support](./docs/debugger.md):** Full implementation of the [Chrome DevTools Protocol (CDP)](https://chromedevtools.github.io/devtools-protocol/) enables seamless integration with Chrome Debugger for enhanced debugging capabilities.\n- **[WebAssembly Support](./docs/wasm.md):** Initial WebAssembly support for module loading, instantiation, and basic JavaScript-to-WASM interoperability.\n\n## Performance\nFor detailed performance benchmarks, please refer to [performance comparison document](./docs/benchmark.md). The benchmark results show that PrimJS outperforms QuickJS by approximately 28% in overall score (3735 vs 2904) on the Octane Benchmark suite.\nWe are continuously working on performance optimizations.\n\n## Quick Start\n\n### Dependencies\n1. **Clone the repository:**\n   ```bash\n   git clone git@github.com:lynx-family/primjs.git\n   ```\n\n2. **Install dependencies:**\n   ```bash\n   cd primjs\n   source tools/envsetup.sh\n   hab sync .\n   ```\n\n### Building on Linux and macOS\nPrimJS uses `gn` and `ninja` for building. Follow these steps to generate the `qjs` binary:\n\n```bash\ngn gen out/Default\nninja -C out/Default qjs_exe\n```\n\nTo enable the template interpreter and garbage collector, use the following `gn` arguments (for example, on the arm64 platform, these arguments configure the build system to target ARM64 architecture while enabling the bytecode-based template interpreter and automatic memory management):\n\n```bash\ngn gen out/Default --args= '\n    target_cpu=\"arm64\" \n    enable_primjs_snapshot = true\n    enable_compatible_mm = true\n    enable_tracing_gc = true'\nninja -C out/Default -j32 qjs_exe\n```\n\n### Release Build\nFor a release build, set the `is_debug = false` argument during configuration.\n\n### Running PrimJS\nThe primary binary is `qjs`, located at `out/Default/qjs`. Use it to run JavaScript files:\n\n```bash\n./out/Default/qjs test.js\n```\n\n### Running Tests\nRun the following steps from the root directory to build and execute unit tests:\n\n#### Build Unit Tests\n```bash\npython3 tools/ci/check_test_build.py\n```\n\n#### Run Unit Tests\n```bash\npython3 tools/ci/check_test_run.py\n```\n\n## How to Contribute\n### [Code of Conduct][coc]\nWe are devoted to ensuring a positive, inclusive, and safe environment for all contributors. Please find our [Code of Conduct][coc] for detailed information.\n\n[coc]: CODE_OF_CONDUCT.md\n\n### [Contributing Guide][contributing]\nWe welcome you to join and become a member of Lynx Authors. It's people like you that make this project great.\n\nPlease refer to lynx [contributing guide][contributing] for details.\n\n[contributing]: https://github.com/lynx-family/lynx/blob/develop/CONTRIBUTING.md\n\n### Open Source Roadmap\n\n## Discussions\nLarge discussions and proposals are discussed in [Github Discussions](https://github.com/lynx-family/primjs/discussions)\n\n## [License][license]\nPrimJS is Apache licensed, as found in the [LICENSE][license] file.\n\n[license]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flynx-family%2Fprimjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flynx-family%2Fprimjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flynx-family%2Fprimjs/lists"}