Escargot is a lightweight JavaScript engine designed specifically for resource-constrained environments.
  • C++ 91.5%
  • Python 4.1%
  • JavaScript 2%
  • Java 1.7%
  • CMake 0.5%
  • Other 0.2%
Find a file
HyukWoo Park 57c23d62f0 Fix Error creation process to check and trigger Error relevant callbacks correctly
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2024-05-14 10:08:26 +09:00
.ahub/sam Update sam exclude file with comments 2023-04-21 14:47:59 +09:00
.github Add ESCARGOT_USE_EXTENDED_API build option to managed APIs used only for third party 2024-05-14 10:08:26 +09:00
build Add ESCARGOT_USE_EXTENDED_API build option to managed APIs used only for third party 2024-05-14 10:08:26 +09:00
docs Initial debugger documentation 2021-09-08 18:09:48 +09:00
packaging Implement riscv64 build support 2023-07-24 16:57:25 +09:00
src Fix Error creation process to check and trigger Error relevant callbacks correctly 2024-05-14 10:08:26 +09:00
test Fix calculation of outer limit of complex jump correctly 2024-05-02 10:17:14 +09:00
third_party Update Walrus module 2024-04-05 12:08:07 +09:00
tools Implement Immutable Prototype Exotic Object 2024-04-03 16:49:20 +09:00
.clang-format Apply clang-formatting 2016-12-08 14:53:01 +09:00
.gitignore Generate EscargotInfo.h file in CMAKE_BINARY_DIR/escargot_generated/ not on src 2023-10-19 12:07:35 +09:00
.gitmodules Add untracked flag for web-tooling-benchmark submodule 2023-12-18 08:41:26 +09:00
CMakeLists.txt Update Walrus module 2024-04-05 12:08:07 +09:00
LICENSE Update README 2020-08-25 11:38:57 +09:00
LICENSE.Apache-2.0 Change default license to LGPL license (#60) 2018-03-07 18:38:28 +09:00
LICENSE.BOEHM-GC Add missing license file 2023-11-01 12:50:15 +09:00
LICENSE.BSD-2-Clause Change default license to LGPL license (#60) 2018-03-07 18:38:28 +09:00
LICENSE.BSD-3-Clause Change default license to LGPL license (#60) 2018-03-07 18:38:28 +09:00
LICENSE.LGPL-2.1+ Change default license to LGPL license (#60) 2018-03-07 18:38:28 +09:00
LICENSE.MIT Change default license to LGPL license (#60) 2018-03-07 18:38:28 +09:00
LICENSE.MPL-2.0 Change default license to LGPL license (#60) 2018-03-07 18:38:28 +09:00
README.md Fix broken badge in README 2023-12-20 16:00:08 +09:00
RELEASE_VERSION Implment tizen build of escargot 2023-06-14 12:38:57 +09:00

Escargot

License GitHub release (latestSemVer) Actions Status Coverity Scan Build Status codecov

Prerequisites

On Ubuntu Linux

General build prerequisites:

sudo apt-get install autoconf automake cmake libtool libicu-dev ninja-build

Prerequisites for x86-64-to-x86 compilation:

sudo apt-get install gcc-multilib g++-multilib
sudo apt-get install libicu-dev:i386

On macOS

brew install autoconf automake cmake icu4c libtool ninja pkg-config

Build Escargot

git clone https://github.com/Samsung/escargot.git
cd escargot
git submodule update --init third_party
cmake -DESCARGOT_MODE=release -DESCARGOT_OUTPUT=shell -GNinja
ninja

Build Android version

git clone https://github.com/Samsung/escargot.git
cd escargot
git submodule update --init third_party
export ANDROID_SDK_ROOT=.... # set your android SDK root first
cd build/android/
./gradlew bundleReleaseAar # build escargot AAR
./gradlew assembleDebug # build debug test shell
./gradlew :escargot:connectedDebugAndroidTest # run escargot-jni tests on android device
./gradlew :escargot:testDebugUnitTest # run escargot-jni tests on host
./gradlew bundleHostJar # bundle jar for host

Build Windows version

Install VS2022 with cmake and ninja. Open [ x86 Native Tools Command Prompt for VS 2022 | x64 Native Tools Command Prompt for VS 2022 ]

git clone https://github.com/Samsung/escargot.git
cd escargot
git submodule update --init third_party

CMake -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
cd out
msbuild ESCARGOT.sln /property:Configuration=Release /p:platform=[ Win32 | x64 ]

Build options

The following build options are supported when generating ninja rules using cmake.

  • -DESCARGOT_HOST=[ linux | tizen_obs | darwin | android | windows ]
    Compile Escargot for Linux, Tizen, macOS, or Windows platform
  • -DESCARGOT_ARCH=[ x64 | x86 | arm | i686 | aarch64 ]
    Compile Escargot for each architecture
  • -DESCARGOT_MODE=[ debug | release ]
    Compile Escargot for either release or debug mode
  • -DESCARGOT_OUTPUT=[ shared_lib | static_lib | shell | cctest ]
    Define target output type
  • -DESCARGOT_LIBICU_SUPPORT=[ ON | OFF ]
    Enable libicu library if set ON. (Optional, default = ON)
  • -DESCARGOT_THREADING=[ ON | OFF ]
    Enable Threading support. (Optional, default = OFF)
  • -DESCARGOT_CODE_CACHE=[ ON | OFF ]
    Enable Code cache support. (Optional, default = OFF)
  • -DESCARGOT_WASM=[ ON | OFF ]
    Enable WASM support. (Optional, default = OFF)
  • -DESCARGOT_SMALL_CONFIG=[ ON | OFF ]
    Enable Options for small devices. (Optional, default = OFF)

Testing

First, get benchmarks and tests:

git submodule update --init

Benchmarks

Test run for each benchmark (Sunspider, Octane, V8, Chakracore, test262, SpiderMonkey, etc.):

tools/run-tests.py --arch=x86_64 spidermonkey test262 v8