-
- In Hermes Ahead-Of-Time (AOT) compilation means the translation of JavaScript code to Herems byte code.
- Hermes has both, a single-threaded, generational, stop the world GC called GenGC and a concurrent GC called Hades which seems to be the default GC. Concurrent GC seems to be only implemented on 64-bit architectures (see Incremental Mode).
- Internally uses AsmJit to generate code. AsmJit currently supports 32-bit and 64-bit X86, AArch64, and AArch32 in a separate testing branch. The Hermes JIT itself currently only supports AArch64.
- JSI (JavaScript Interface) is Hermes' JS to Native interface that enables direct communication between native code and JavaScript (also see Tzvetan's Hermes JSI Demos).
- There's an ongoing discussion in Hermes about support for the Node-API instead or in addition to JSI (see Using Rust in react-native with jsi-rs for a comparison of the different approaches).
-
How to try Static Hermes (Discussion in the hermes repository)
-
Static Hermes for React Native (PR in the react-native repository)
-
Static Hermes with Tzvetan Mikov (React Native Radio, Episode 323, Feb 2025)
- Talks about JIT compilation of JS to native code?
- Static Hermes will replace Hermes for untyped JS in 2025.
-
Neil Dhar: Optimizing with Static Hermes (Chain React, 2024)
- Sound Types (i.e. proving correctness of Typescript/Flow type annotations)
- Inlining
- Object Elision (aka Scalar Replacement)
-
Tzvetan Mikov's tweet on Static Hermes running Octane (GitHub repo)
- Compares WebKit's JavaScriptCore (
jsc
), Google's V8 and QuickJS Javascript Engine with Hermes and Static Hermes.
- Compares WebKit's JavaScriptCore (
-
Tzvetan Mikov: Hermes: better performance with runtime bytecode translation (React Universe Conf, 2024) (slisdes)
- Bytecode translation (to native) on the device (seems to be a very simple JIT similar to an "unrolled" Template Interpreter).
- Static Hermes has two back ends: one produces bytecode and the other one native code with the help of LLVM.
-
Tzvetan Mikov: Static Hermes: the Next Generation of Hermes (React Native EU, 2023) (slides)
-
Tzvetan Mikov: Improving React Native Performance (React Native EU, 2019)
- Introducing Hermes
- Hermes AOT: JS -> AST -> SSA -> Optimizations (inlining, common subexpression elimination, constant folding/propagation, type inference) -> Bytecode (variable length, register machine)
-
React Native for Windows + macOS - Microsoft's fork of React Native with support for Windows SDK as well as the macOS 10.14 SDK.
- Builds native Windows apps for all devices supported by Windows 10 and higher including PCs, tablets, 2-in-1s, Xbox, Mixed reality devices, etc., as well as the macOS desktop and laptop ecosystems.
- GitHub repository
- Uses Microsoft's own fork of Hermes
-
Fabric - React Native's New rendering system architecture, also called UI manager or rendering engine (experimental since 0.68, default since 0.76).
- Uses the Yoga layout engine in the so called "shadow thread" (i.e. the thread between the native UI thread and the main JS thread). In the "old architecture", the communication between these threads happened over a so called "bridge" and was asynchronous through serialized JSON messages.
- The new architecture uses the JavaScriptInterface (JSI) for direct, synchronous communication between JS and the native UI code.
- Turbo Modules - native modules which use JSI for typesafe communication with the JS world. The corresponding typed JS interfaces (Flow, Typescript) are automatically generated by Codegen.
-
Moving Towards a Stable JavaScript API (since 0.80)
-
Bundled Hermes - starting with 0.69 every React Native version is tied to and bundled with a specific version of Hermes.
-
Announcing Node-API Support for React Native: aims to bring Node-API, the native module system developed and widely used in Node.js, into React Native. Node-API allows native code to interface with JavaScript in a runtime-independent and stable way. It’s used in production today across Node.js, Deno, Bun, and more.
- Also see the Node-API Modules for React Native GitHub repository.
- Also see the Hermes PR [DRAFT] Add Node-API to Hermes with Tzvetan's comment: "we think n-api might be great for implementing builtin functionality like the new Temporal proposal, or even Intl, etc. In other words, we are eager to adopt it and use it ourselves for library functionality. It should also make it dramatically easier for people to contribute library code to Hermes using a well known and stable API. (JSI is also an option for this, but it somewhat less suited because it relies on exceptions and RTTI, while Hermes itself is compiled without them.)".