Skip to content
Hermes is a small and lightweight JavaScript engine optimized for running React Native on Android.
Branch: master
Clone or download
dulinriley and facebook-github-bot Update configure.sh to use the correct LLVM_BUILD_DIR (#32)
Summary:
For people that specify a specific LLVM_BUILD_DIR, make sure configure.sh respects that.
Before this change, it would add LLVM_BUILD_DIR to HERMES_WS_DIR, but LLVM_BUILD_DIR is supposed to be an absolute path.
Pull Request resolved: #32

Differential Revision: D16269350

Pulled By: dulinriley

fbshipit-source-id: 13a78eb653f06413af9663f9e04e4c6c89271c27
Latest commit 3ed8340 Jul 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
API Add "kind" to raiseStackOverflow; increase native stack depth limit. Jul 13, 2019
android Initial commit Jul 10, 2019
config Initial commit Jul 10, 2019
doc Clarify mention of Unicode in Features.md (#30) Jul 14, 2019
external Initial commit Jul 10, 2019
first-party More generous access to `DestructorThread.Destructor` Jul 12, 2019
include Switch arrayPrototypeFind to use void *ctx as an integer instead of a… Jul 15, 2019
lib Switch arrayPrototypeFind to use void *ctx as an integer instead of a… Jul 15, 2019
lldb Initial commit Jul 10, 2019
npm Update Hermes Doc Site url (#14) Jul 11, 2019
public Initial commit Jul 10, 2019
test Remove use of ctx for ThrowTypeError, encode message in throwTypeError Jul 15, 2019
tools Add version string to REPL. Jul 12, 2019
unittests Add "kind" to raiseStackOverflow; increase native stack depth limit. Jul 13, 2019
utils Update configure.sh to use the correct LLVM_BUILD_DIR (#32) Jul 15, 2019
website Add missing copyright headers to a few files Jul 12, 2019
.clang-format Initial commit Jul 10, 2019
.clang-tidy Initial commit Jul 10, 2019
.gitignore Initial commit Jul 10, 2019
CMakeLists.txt Print HERMES_RELEASE_VERSION in version string. Jul 12, 2019
CODE_OF_CONDUCT.md Initial commit Jul 10, 2019
CONTRIBUTING.md Initial commit Jul 10, 2019
LICENSE Initial commit Jul 10, 2019
README.md Fix broken links in the readme Jul 11, 2019
git-revision Initial commit Jul 10, 2019

README.md

Hermes JS Engine

MIT license npm version PRs Welcome

Hermes is a JavaScript engine optimized for fast start up of React Native apps on Android. It features ahead-of-time static optimization and compact bytecode.

If you're only interested in using pre-built Hermes in a new or existing React Native app, you do not need to follow this guide or have direct access to the Hermes source. Instead, just follow these instructions to enable Hermes.

If you want to know how to build and hack on Hermes directly, and/or integrate Hermes built from source into a React Native app then read on.

The instructions here very briefly cover steps to build the Hermes CLI. They assume you have typical native development tools setup for your OS, and support for cmake and Ninja. For more details of required dependencies, building Hermes with different options, etc. follow these links instead:

To build a local debug version of the Hermes CLI tools the following steps should get you started on macOS/Linux:

mkdir hermes_workingdir
cd hermes_workingdir
export HERMES_WS_DIR="$PWD"
git clone git@github.com:facebook/hermes.git
hermes/utils/build_llvm.py llvm llvm_build
hermes/utils/configure.sh
cd build
ninja

Or if you're using Windows, the following should get you going in a Git Bash shell:

mkdir hermes_workingdir
cd hermes_workingdir
export HERMES_WS_DIR="$PWD"
git -c core.autocrlf=false clone git@github.com:facebook/hermes.git
BUILD_SYSTEM='Visual Studio 16 2019' CMAKE_FLAGS='-A x64' hermes/utils/build_llvm.py --distribute llvm llvm_build
CMAKE_FLAGS='-A x64 -DLLVM_ENABLE_LTO=OFF' hermes/utils/configure.sh 'Visual Studio 16 2019'
cd build
MSBuild.exe ALL_BUILD.vcxproj /p:Configuration=Release

You will now be in a directory with the output of building Hermes into CLI tools. From here you can run a piece of JavaScript as follows:

echo "'use strict'; function hello() { print('Hello World'); } hello();" | ./bin/hermes

Contributing

The main purpose of this repository is to continue to evolve Hermes, making it faster and more efficient. We are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving Hermes.

Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Hermes.

License

Hermes is MIT licensed.

You can’t perform that action at this time.