Skip to content
Hermes is a small and lightweight JavaScript engine optimized for running React Native on Android.
C++ JavaScript Python Java CMake Shell Other
Branch: master
Clone or download

Latest commit

dulinriley and facebook-github-bot Make vmisa use llvm::isa instead of dyn_vmcast
This is a minor change: before, `hermes::vm::vmisa` would call `dyn_vmcast` and check if
the return type is null, and that ends up calling `llvm::dyn_cast`, which calls `llvm::isa`.

Skip the extra steps and stack frames and call `llvm::isa` directly.
`vmisa_or_null` was unused, so delete it.

I don't expect any perf benefits in an opt build (inlinining should fix all of these anyway),
but there could be some small benefits for debug builds.

Reviewed By: tmikov

Differential Revision: D21872130

fbshipit-source-id: cb23402264f1073405596ee807ebf75e7e8a5799
Latest commit 29bd793 Jun 3, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Use apt-get in non-interactive mode for all jobs (#230) Apr 26, 2020
API Handle stack overflow in JSError construction gracefully Jun 4, 2020
android Include JSI headers in the Android build May 20, 2020
cmake/modules Improve build and add instructions Feb 21, 2020
config Tidy up license headers [1/2] Oct 15, 2019
doc Add missing quote in the Windows build command (#253) May 27, 2020
external Fix fbcode InitLLVM memory leak May 12, 2020
first-party Expose function to determine if a global JVM is available May 28, 2020
include Make vmisa use llvm::isa instead of dyn_vmcast Jun 4, 2020
lib Handle stack overflow in JSError construction gracefully Jun 4, 2020
lldb Make script for use with Mozilla RR chaos mode Apr 16, 2020
npm Update tests and delete REPL code Apr 21, 2020
public Remove the non-Chrome memory profiler May 1, 2020
test Fix Error message when passing 'undefined' to the constructor (#254) May 29, 2020
tools Use PseudoHandle in JSObject API. Jun 1, 2020
unittests Use PseudoHandle in JSObject API. Jun 1, 2020
utils Remove Apr 28, 2020
website Improve playground UX on mobile OS May 26, 2020
.clang-format Initial commit Jul 10, 2019
.clang-tidy Initial commit Jul 10, 2019
.gitignore BUCK build to use external/llvh Feb 9, 2020
CMakeLists.txt Add support for OSS-Fuzz build May 21, 2020 Update Code of Conduct Sep 5, 2019 Initial commit Jul 10, 2019
LICENSE Initial commit Jul 10, 2019 Update gramatical mistake (#124) Apr 2, 2020
git-revision Initial commit Jul 10, 2019

Hermes JS Engine

MIT license npm version PRs Welcome Hermes logo - large H with wings

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
git clone
cd build

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

mkdir hermes_workingdir
cd hermes_workingdir
git -c core.autocrlf=false clone
hermes/utils/build/ --build-system='Visual Studio 16 2019' --cmake-flags='-A x64 --distribute
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


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.


Hermes is MIT licensed.

You can’t perform that action at this time.