top | item 26565800

(no title)

dizzy3gg | 5 years ago

From the docs: "Hermes is an open-source JavaScript engine optimized for running React Native apps on Android."

Looks like it's available for iOS now too :)

Announcing React Native 0.64 with Hermes on iOS https://reactnative.dev/blog/2021/03/12/version-0.64

discuss

order

madeofpalk|5 years ago

Interesting - I would have thought custom JS engines/runtimes would be a no go for both iOS and the iOS App Store.

SigmundA|5 years ago

Beyond any TOS issues there has always been a technical issue where an app store app cannot write to memory that is marked executable for security purposes.

This prevents JIT's but does not prevent an interpreter from functioning since an interpreter does not directly generate machine code and execute it, it simply reads the code to interpret as data and executes through its own engine.

Most modern JS engines JIT which is why you don't see say electron / node / chromium based stuff on iOS, a lot of it has to do with V8 requiring the ability to JIT.

Hermes does not JIT so it sidesteps the technical limitations on iOS then its just a matter of passing review.

There where some ways around this that have been patched and Apple has recent introduced an official entitlement but does not allow it in the app store yet:

https://saagarjha.com/blog/2020/02/23/jailed-just-in-time-co...

https://9to5mac.com/2020/11/06/ios-14-2-brings-jit-compilati...

lucideer|5 years ago

Definitely fine for Android (there's plenty of them), but I would've thought the same for iOS.

Now that I think of it though, I think the Apple ToS that prohibit browsers are about function (app used to browse the web) rather than internals (language support in the engine).

afavour|5 years ago

They used to be. I can't remember the exact part now but the TOS used to ban anything that wasn't iOS's own JavaScriptCore runtime. They changed it a few years ago.