WhoBuilt

React Native 0.64 with Hermes for iOS

May 11, 2021· 1 h 4 min· 4.0K views·Watch on YouTube

Speakers

Host Mike, Shun from Facebook’s Hermes team, and Alloy Brand from Microsoft discuss Hermes and its new iOS support in React Native 0.64 on Callstack’s React Native Show.

What Hermes optimizes

Shun describes Hermes as a JavaScript engine designed for React Native, with a focus on time to interactive, app size, and memory use. Facebook measurements cited in the episode show startup time and APK size roughly halved, with memory use reduced by about one-third to one-quarter.

Why Hermes compiles ahead of time

Hermes compiles JavaScript into optimized bytecode during the app build, so the device can load it without parsing and compiling the source at startup. Shun explains that AOT describes when compilation happens, not whether the output is native machine code. He says React Native’s bundled code and interaction-driven workload make this approach useful: many functions run only once or not at all during startup.

Roadmap and community needs

Shun says Hermes is still adding JavaScript features and improving garbage collection, memory use, and tooling. He describes work on shorter GC pauses, 32-bit values with pointer compression, and inline storage for small arrays. The guests also discuss community blockers: proxy support became the default in React Native 0.64, while Android internationalization support was planned for 0.65.

Why bring Hermes to iOS and macOS

Alloy explains that Microsoft wanted a shared, adaptable engine for React Native across platforms, with consistent debugging and tooling. He says Hermes lets Microsoft address React Native-specific needs, including debugging around synchronous native calls. The discussion also notes that Hermes may improve startup and memory behavior on iOS, while JavaScriptCore can remain a better fit for apps prioritizing current app size.

Apple review and platform support

Alloy argues that Hermes avoids the JIT behavior Apple has restricted: compiling code to native machine code in memory and marking it executable. The episode presents Hermes support for iOS and macOS as available work, while treating future default adoption across platforms as uncertain. Mike points listeners to an accompanying article for implementation details and setup.

Takeaways

  • Measure time to interactive, memory, and download size separately when evaluating a JavaScript engine.
  • AOT means compilation happens before runtime; it does not necessarily mean compilation to native code.
  • React Native’s bundled, interaction-driven workload can make startup-focused bytecode precompilation a practical fit.
  • A shared engine can reduce duplicated debugging and tooling work across platforms.
  • Check platform-specific needs, including internationalization and app size, before switching engines.

Mentioned in this talk

Search inside this talk

What was claimed 10

Related talks