Hermes is a small and lightweight JavaScript engine optimized for running React Native apps..
Перейти к файлу
Will Holen 064e4a09af Add a "Debug Build" flag to HermesInternal.getRuntimeProperties()
Summary:
This diff adds a "Debug Build" key to the RuntimeProperties to easily
determine whether the VM was built with `-DNDEBUG` or `-UNDEBUG`.

Reviewed By: tmikov

Differential Revision: D22004322

fbshipit-source-id: 9a12e681b758a95f9eebb5f7e1198aa66e3f131c
2020-06-11 16:35:37 -07:00
.circleci Bundle vcruntime140_1.dll in NPMs (#269) 2020-06-08 21:36:25 -07:00
API Remove TODOs and add explanatory comments instead for WeakObject APIs 2020-06-11 13:46:34 -07:00
android Include JSI headers in the Android build 2020-05-19 20:32:17 -07:00
cmake/modules Improve build and add instructions 2020-02-21 00:37:51 -08:00
config Tidy up license headers [1/2] 2019-10-15 12:34:49 -07:00
doc Update ReactNativeIntegration.md 2020-06-08 16:51:09 -07:00
external Add missing cstdint include. 2020-06-05 15:53:10 -07:00
first-party Expose function to determine if a global JVM is available 2020-05-28 00:36:59 -07:00
include Add AtomicIfConcurrentGC for array lengths 2020-06-11 12:37:05 -07:00
lib Add a "Debug Build" flag to HermesInternal.getRuntimeProperties() 2020-06-11 16:35:37 -07:00
lldb Make chaos_until_crash.py script for use with Mozilla RR chaos mode 2020-04-16 16:12:03 -07:00
npm Bundle vcruntime140_1.dll in NPMs (#269) 2020-06-08 21:36:25 -07:00
public Remove the non-Chrome memory profiler 2020-05-01 14:21:28 -07:00
test Confirm sticky('y') flag behavior in split 2020-06-10 22:10:13 -07:00
tools Use PseudoHandle in JSObject API. 2020-06-01 11:15:09 -07:00
unittests Add AtomicIfConcurrentGC for array lengths 2020-06-11 12:37:05 -07:00
utils Set recursion depth limit on regex parser 2020-06-08 14:51:46 -07:00
website Improve playground UX on mobile OS 2020-05-26 15:45:08 -07:00
.clang-format Initial commit 2019-07-10 09:43:55 -07:00
.clang-tidy Initial commit 2019-07-10 09:43:55 -07:00
.gitignore BUCK build to use external/llvh 2020-02-08 17:36:29 -08:00
CMakeLists.txt Add support for OSS-Fuzz build 2020-05-21 14:21:59 -07:00
CODE_OF_CONDUCT.md Update Code of Conduct 2019-09-05 16:59:11 -07:00
CONTRIBUTING.md Initial commit 2019-07-10 09:43:55 -07:00
LICENSE Initial commit 2019-07-10 09:43:55 -07:00
README.md Update gramatical mistake README.md (#124) 2020-04-01 18:35:08 -07:00
git-revision Initial commit 2019-07-10 09:43:55 -07:00

README.md

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 https://github.com/facebook/hermes.git
hermes/utils/build/configure.py
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
git -c core.autocrlf=false clone https://github.com/facebook/hermes.git
hermes/utils/build/configure.py --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

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.