Upgrading react native app and using Hermes engine

For those who don’t know, react native is a mobile application framework which lets you write apps using JavaScript.
This JavaScript is ran in an interpreter/vm included in the app and that interpreter/vm translates JavaScript calls to native calls and back (thus JavaScript being a scripting language here somehow).
For a long time, that interpreter was JavaScriptCore, but recently Facebook developed a new interpreter to solve some issues like app size and time to interact and it’s called Hermes.
One special thing about this interpreter is that it can run a special type of byte code to improve app performance, which is by default generated in release builds and bundled with the app.

The issue with this is that a binary is used to generate that byte code from the JavaScript, thus being essential in building the app using the new Hermes engine. The binary is downloaded by node (npm) in node_modules.
The Hermes engine is open source (MIT) and those binaries are pre-compiled and provided for ease of use (and probably, but not sure, don’t contain malicious code not exposed on GitHub).

I’ve recently updated my react native application and enabled Hermes and I would like to know if the update will be accepted, regarding the addition of Hermes and the need for that binary.

My app (com.controlloid) is already on fdroid and configured to auto update, but this update will break the build so I’ll have to make a PR with the fix (allowing that binary to exist) and my question is if it will be accepted (or should I go back to JavaScriptCore, although I don’t want).

Hermes can’t be build at build time?

Using a prebuilt binary is against our policy.
So you should either:

  • Build hermes from source during the build process
  • Don’t use hermes for the F-Droid build
Mastodon