{"id":21644435,"url":"https://github.com/samsung/escargot","last_synced_at":"2025-05-16T05:04:31.632Z","repository":{"id":37734417,"uuid":"148456348","full_name":"Samsung/escargot","owner":"Samsung","description":"Escargot is a lightweight JavaScript engine designed specifically for resource-constrained environments.","archived":false,"fork":false,"pushed_at":"2025-05-14T05:34:31.000Z","size":97917,"stargazers_count":292,"open_issues_count":27,"forks_count":45,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-05-14T06:47:52.323Z","etag":null,"topics":["javascript-engine"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Samsung.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-09-12T09:34:44.000Z","updated_at":"2025-05-14T05:34:36.000Z","dependencies_parsed_at":"2023-02-17T13:00:38.419Z","dependency_job_id":"2d910ed6-7284-4f30-911b-fdb312300d50","html_url":"https://github.com/Samsung/escargot","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2Fescargot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2Fescargot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2Fescargot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2Fescargot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samsung","download_url":"https://codeload.github.com/Samsung/escargot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471060,"owners_count":22076585,"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-engine"],"created_at":"2024-11-25T05:40:09.226Z","updated_at":"2025-05-16T05:04:31.610Z","avatar_url":"https://github.com/Samsung.png","language":"C++","readme":"# Escargot\n\n[![License](https://img.shields.io/badge/License-LGPL%20v2.1-blue.svg)](LICENSE)\n[![GitHub release (latestSemVer)](https://img.shields.io/github/v/release/Samsung/escargot)](https://github.com/Samsung/escargot/releases)\n[![Actions Status](https://github.com/Samsung/escargot/workflows/ES-Actions/badge.svg)](https://github.com/Samsung/escargot/actions/workflows/es-actions.yml)\n[![Coverity Scan Build Status](https://scan.coverity.com/projects/21647/badge.svg)](https://scan.coverity.com/projects/samsung-escargot)\n[![codecov](https://codecov.io/gh/Samsung/escargot/branch/master/graph/badge.svg?token=DX8CN6E7A8)](https://codecov.io/gh/Samsung/escargot)\n\n\nEscargot is a lightweight JavaScript engine developed by [Samsung](https://github.com/Samsung), designed specifically for resource-constrained environments. It is optimized for performance and low memory usage, making it ideal for use in embedded systems, IoT devices, and other applications where resources are limited.\n\nKey features of Escargot include:\n* **ECMAScript Compliance**: Escargot supports a significant portion of the latest ECMAScript version ([ECMAScript 2024](https://262.ecma-international.org/15.0/)), ensuring compatibility with modern JavaScript standards while maintaining a lightweight footprint.\n* **Memory Efficiency**: The engine is designed with memory constraints in mind, making it suitable for devices with limited RAM and storage.\n* **Performance Optimization**: Escargot implements various optimization techniques to ensure fast execution of JavaScript code, even on low-power devices.\n* **Extensibility**: The engine can be customized and extended to meet the specific needs of different applications, providing flexibility for developers.\n\nEscargot is an open-source project that allows developers to contribute to its development or use it in their own projects, while also powering several services in Samsung products. The engine's design prioritizes simplicity and efficiency, making it an excellent choice for developers working in embedded or resource-limited environments.\n\n\n## Contents 📋\n* [Building](#Building-)\n  * [Linux](#Linux)\n  * [macOS](#macOS)\n  * [Android](#Android)\n  * [Windows](#Windows)\n* [Testing](#Testing-)\n* [Contributing](#Contributing-)\n* [Research Papers](#Research-Papers-)\n* [License](#License-)\n\n## Building 🛠️\n\n### Supported Platforms and Architectures\n| **OS** | **Architecture** |\n|-|-|\n| **Linux(Ubuntu)** | x86/x64/arm/aarch64 |\n| macOS | x64/aarch64 |\n| Windows | x86 |\n| Android | x86/x64/arm/aarch64 |\n\n### Build Options\n\nThe following build options are supported when generating ninja rules using cmake.\n\n| **Option** | **Description** | **Flag** | **Value** | **Default** |\n|-|-|-|-|-|\n| **HOST** | Choose target platform | -DESCARGOT_HOST | linux/darwin/android/windows | |\n| **ARCH** | Choose target architecture | -DESCARGOT_ARCH | x64/x86/arm/aarch64 | |\n| **MODE** | Choose release/debug mode | -DESCARGOT_MODE | release/debug | release |\n| **OUTPUT** | Choose build output type | -DESCARGOT_OUTPUT | shared_lib/static_lib/shell/cctest | shell |\n| **LIBICU** | Include libicu library | -DESCARGOT_LIBICU_SUPPORT | ON/OFF | ON |\n| **THREADING** | Enable threading features (e.g. Atomics, SharedArrayBuffer) | -DESCARGOT_THREADING | ON/OFF | OFF |\n| **WASM** | Enable WebAssembly support | -DESCARGOT_WASM | ON/OFF | OFF |\n| **CODE_CACHE** | Enable code cache | -DESCARGOT_CODE_CACHE | ON/OFF | OFF |\n| **TCO** | Enable tail call optimization | -DESCARGOT_TCO | ON/OFF | OFF |\n| **SMALL_CONFIG** | Enable aggressive memory optimizations for tiny devices | -DESCARGOT_SMALL_CONFIG | ON/OFF | OFF |\n| **TEST** | Enable additional features used only for testing | -DESCARGOT_TEST | ON/OFF | OFF |\n\n### Linux\n\nGeneral build prerequisites:\n```sh\nsudo apt-get install autoconf automake cmake libtool libicu-dev ninja-build\n```\n\nPrerequisites for x86-64-to-x86 compilation:\n```sh\nsudo apt-get install gcc-multilib g++-multilib\nsudo apt-get install libicu-dev:i386\n```\n\nBuild Escargot:\n```sh\ngit submodule update --init third_party # update submodules\ncmake -DESCARGOT_MODE=release -DESCARGOT_OUTPUT=shell -GNinja\nninja\n```\n\n### macOS\n\nGeneral build prerequisites:\n```sh\nbrew install autoconf automake cmake icu4c libtool ninja pkg-config\n\n# add icu path to pkg_config_path (x64)\nexport PKG_CONFIG_PATH=\"/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH\"\n# add icu path to pkg_config_path (arm64)\nexport PKG_CONFIG_PATH=\"/opt/homebrew/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH\"\n```\n\nBuild Escargot:\n```sh\ngit submodule update --init third_party # update submodules\ncmake -DESCARGOT_MODE=release -DESCARGOT_OUTPUT=shell -GNinja\nninja\n```\n\n### Android\n\nBuild prerequisites on Ubuntu:\n```sh\nsudo apt install openjdk-17-jdk # require java 17\n```\n\nBuild Escargot using gradle:\n```sh\ngit submodule update --init third_party # update submodules\nexport ANDROID_SDK_ROOT=.... # set your android SDK root first\ncd build/android/\n./gradlew bundleReleaseAar # build escargot AAR\n./gradlew bundleHostJar # bundle jar for host\n./gradlew javadocJar # create java doc\n./gradlew sourcesJar # create sources jar\n\n./gradlew assembleDebug # build debug test shell\n./gradlew :escargot:connectedDebugAndroidTest # run escargot-jni tests on android device\n./gradlew :escargot:testDebugUnitTest # run escargot-jni tests on host\n```\n\n### Windows\n\nInstall VS2022 with cmake and ninja.\nOpen [ x86 Native Tools Command Prompt for VS 2022 | x64 Native Tools Command Prompt for VS 2022 ]\n\n```sh\ngit submodule update --init third_party # update submodules\n\nCMake -G \"Visual Studio 17 2022\" -DCMAKE_SYSTEM_NAME=[ Windows | WindowsStore ] -DCMAKE_SYSTEM_VERSION:STRING=\"10.0\"  -DCMAKE_SYSTEM_PROCESSOR=[ x86 | x64 ] -DCMAKE_GENERATOR_PLATFORM=[ Win32 | x64 ],version=10.0.18362.0 -DESCARGOT_ARCH=[ x86 | x64 ] -DESCARGOT_MODE=release -Bout -DESCARGOT_HOST=windows -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_THREADING=ON\ncd out\nmsbuild ESCARGOT.sln /property:Configuration=Release /p:platform=[ Win32 | x64 ]\n```\n\n## Testing ✅\n\nEscargot supports various benchmark sets, which can be run using the [tools/run-tests.py](https://github.com/Samsung/escargot/blob/master/tools/run-tests.py) script.\n\n| Benchmark | flag |\n| --- | --- |\n| SunSpider 1.0.2 | `sunspider` |\n| [Octane 2.0](https://github.com/chromium/octane.git) | `octane` |\n| [test262](https://github.com/tc39/test262.git) | `test262` |\n| [Web Tooling Benchmark](https://github.com/v8/web-tooling-benchmark) | `web-tooling-benchmark` |\n| SpiderMonkey (vendor-made) | `spidermonkey` |\n| ChakraCore (vendor-made) | `chakracore` |\n| V8 (vendor-made) | `v8` |\n\nRun each benchmark separately or all together as shown below:\n```sh\ntools/run-tests.py --engine=./out/linux/x64/release/escargot web-tooling-benchmark\ntools/run-tests.py --engine=./out/linux/x64/release/escargot spidermonkey test262 v8\n```\n\n## Contributing 💡\nEscargot welcomes contributions from developers in any form, wheter it's code, documentation, bug reports, or suggestions. By contributing to the project, you agree to license your contributions under the [LGPL-2.1](https://github.com/Samsung/escargot/blob/master/LICENSE) license.\n\n#### ❗ Vulnerability Reporting\n⚠️ If you identify any vulnerabilities, please report them through the [Issues page](https://github.com/Samsung/escargot/issues). *Reports sent via other channels may not be considered or may be processed with delays*. Please note that our project assumes the execution of valid JavaScript source code only. Handling of invalid source code is not within the main scope of this project and might not be addressed.\n\n## Research Papers 📝\n* [Dynamic code compression for JavaScript engine](https://doi.org/10.1002/spe.3186)  \n  Software: Practice and Experience Vol. 53 (5), pp. 1196-1217, 2023\n\n* [Tail Call Optimization Tailored for Native Stack Utilization in JavaScript Runtimes](https://doi.org/10.1109/ACCESS.2024.3441750)  \n  IEEE Access Vol. 12, pp. 111801-111817, 2024\n\n## License 📜\nEscargot is open-source software primarily licensed under [LGPL-2.1](https://github.com/Samsung/escargot/blob/master/LICENSE), with some components covered by other licenses. Complete license and copyright information can be found in the source code.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsung%2Fescargot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamsung%2Fescargot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsung%2Fescargot/lists"}