Skip to content

Escargot is a lightweight JavaScript engine designed specifically for resource-constrained environments.

License

LGPL-2.1 and 4 other licenses found

Licenses found

LGPL-2.1
LICENSE
Unknown
LICENSE.BOEHM-GC
Unknown
LICENSE.BSD-2-Clause
BSD-3-Clause
LICENSE.BSD-3-Clause
MIT
LICENSE.MIT
Notifications You must be signed in to change notification settings

Samsung/escargot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3e1fa28 · Apr 5, 2023
Apr 3, 2023
Apr 5, 2023
Apr 4, 2023
Sep 8, 2021
Apr 4, 2023
Sep 29, 2022
Apr 5, 2023
Jan 4, 2023
Dec 8, 2016
Nov 13, 2020
May 15, 2018
Nov 13, 2020
Jan 5, 2023
Sep 29, 2021
Aug 25, 2020
Mar 7, 2018
Mar 7, 2018
Mar 7, 2018
Mar 7, 2018
Mar 7, 2018
Mar 7, 2018
Feb 23, 2023
Apr 5, 2023

Repository files navigation

Escargot

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

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

Note: For later build steps (cmake, pkg-config) to find ICU libraries, you may need to set the PKG_CONFIG_PATH environment variable, as instructed by brew. E.g.:

export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
# ESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN should be `OFF` to link icu lib in static
cmake -DESCARGOT_HOST=darwin -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=release -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_OUTPUT=shell -GNinja

Build Escargot

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

Build android version of Escargot

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 options

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

  • -DESCARGOT_HOST=[ linux | tizen_obs | darwin | android ]
    Compile Escargot for Linux, Tizen, or macOS 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 | shell_test | cctest ]
    Define target output type
  • -DESCARGOT_LIBICU_SUPPORT=[ ON | OFF ]
    Enable libicu library if set ON. (Optional, default = ON)

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