Hermes is a small and lightweight JavaScript engine optimized for running React Native apps..
Перейти к файлу
Lin Cheng 32d4b941e8 Recognize unsafe Wasm intrinsics
Summary:
This Diff we provide a way to define and recognize unsafe compiler
intrinsics used in Asm.js/Wasm. For now during the pass it only checks
if an intrinsic is defined and is called with correct number of arguments.

Reviewed By: tmikov

Differential Revision: D29637395

fbshipit-source-id: 663bb77ee3beff277b66fb459c5b57be4d735c60
2021-07-24 08:22:12 -07:00
.circleci Replace `master` with `main` or `HEAD` 2021-07-16 18:55:55 -07:00
.github Replace `master` with `main` or `HEAD` 2021-07-16 18:55:55 -07:00
API arm64 simulators & catalyst support (was #543 and #475) (#546) 2021-07-08 17:23:05 -07:00
android Skip constructor-options-style-conflict.js Intl test (#549) 2021-07-09 21:22:30 -07:00
cmake/modules Fix GCC 9 warnings (#488) 2021-04-05 13:54:10 -07:00
config Tidy up license headers [1/2] 2019-10-15 12:34:49 -07:00
doc Replace `master` with `main` or `HEAD` 2021-07-16 18:55:55 -07:00
external Fix ssize_t conflict in 32 bit Windows 2021-07-08 10:53:14 -07:00
include Recognize unsafe Wasm intrinsics 2021-07-24 08:22:12 -07:00
lib Recognize unsafe Wasm intrinsics 2021-07-24 08:22:12 -07:00
lldb apply upgraded black 21.4b2 formatting to fbsource 2021-05-04 22:16:26 -07:00
npm Bump version to 0.8.0 2021-04-28 13:05:56 -07:00
public Delete allowFunctionToStringWithRuntimeSource 2021-07-07 00:22:32 -07:00
test Recognize unsafe Wasm intrinsics 2021-07-24 08:22:12 -07:00
tools Comment out and modify parts of js files 2021-07-22 14:34:38 -07:00
unittests Encode native pointers as doubles 2021-07-23 14:23:53 -07:00
unsupported/juno Generate JS for JSX 2021-07-23 11:23:23 -07:00
utils Revert quotes in build-apple-framework.sh 2021-07-09 15:22:52 -07:00
website Replace `master` with `main` or `HEAD` 2021-07-16 18:55:55 -07:00
.clang-format Initial commit 2019-07-10 09:43:55 -07:00
.clang-tidy EASY: disable facebook-hte-MissingBraces 2020-12-10 19:39:32 -08:00
.gitignore Build Hermes for iOS (#332) 2020-09-08 19:20:22 -07:00
CMakeLists.txt Recognize unsafe Wasm intrinsics 2021-07-24 08:22:12 -07:00
CODE_OF_CONDUCT.md Update Code of Conduct 2019-09-05 16:59:11 -07:00
CONTRIBUTING.md Replace `master` with `main` or `HEAD` 2021-07-16 18:55:55 -07:00
LICENSE Initial commit 2019-07-10 09:43:55 -07:00
README.md Replace `master` with `main` or `HEAD` 2021-07-16 18:55:55 -07:00
git-revision Initial commit 2019-07-10 09:43:55 -07:00
hermes-engine.podspec Bump podspec platform requirement to iOS 11 2021-07-18 14:29:56 -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. 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.

Noted that each Hermes release is aimed at a specific RN version. The rule of thumb is to always follow Hermes releases strictly. Version mismatch can result in instant crash of your apps in the worst case scenario.

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.