Hermes, a JavaScript engine optimized for React Native
hermesengine.dev
hermesengine.dev
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
The recent XBox dashboard has been remade with it.
However nowadays I have become quite sceptical on what it will ever be, and looking forward to what news BUILD 2021 might bring.
C++/WinRT tooling still doesn't match C++/CX, doing UI in .NET or ReactNative (QML style) seems to be the workaround for it, endless list of Github issues on WinUI, Reunion and all WinRT bindings, community talks with lots of previews, and state of current tooling.
Then the various UI teams seem to be competing to which of them will get more developer mindshare.
So it is a mess, that I hope BUILD will get a more clear picture.
I've spent a inordinate amount of time on figuring out how to hire a truly dedicated windows native interface team and the only solid conclusion that I've come to is it's necessary to also recruit to write tooling for the designers to work with. we have a application that happily doesn't need a gui but to be used widely needs a excellent gui. it looks like we'll need at least as many people on interface as for our core application. the tooling, oh the tooling..
this is the one book I most want for Christmas - the true account of what happened to the windows phone interface. I was constantly in awe to behold the developments as they happened ; literally "too good to be true" electrocuted me in my chair every time I read the latest.
Microsoft and Facebook have been lovers since the beginning.. Even in terms of UI design of the earliest of facebook.
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).
> 2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code which introduces or changes features or functionality of the app, including other apps. Educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code provided that such code is not used for other purposes. Such apps must make the source code provided by the Application completely viewable and editable by the user.
Basically embedding any interpreted language inside the app is frowned upon by apple. But historically they have allowed JavaScript and Lua scripts to be embedded in apps.
arguably the ability to view source was what created the possibilities of the Web, and as such I don't read this term to be restrictive but instead merely trying to get the best outcome for everyone.
disclaimer being that I have spent a large part of the past year evaluating a ios app for commercial release that both relies on decades of proprietary design and which probably doesn't have a significant future unless it is opened extensively or completely.
See the expo documentation for details: https://docs.expo.io/bare/updating-your-app/.
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...
I haven't followed it for some time however, it does look like V8 supports a JITless mode now which allows it to possibly be used on iOS and other platforms with NX set, albeit with significant performance loss:
Looks like JavaScriptCore still disables JIT when run in a non entitled app. Always thought they might figure out a way to at least let their own JS engine JIT since its trusted in Safari on the open web, but I believe its an all or nothing thing for the process/app and not per module thing.
All JS improvements for the last 10 years required a lot of bypassing of browser and device maker’s implementation.
I get that Facebook has the biggest apps on any platform and they run into platform limitations (like number of classes on Android) and build cycles so for them it makes sense to make a dynamic partial-hot-reloading-in-place app development framework, but they're still beholden to the runtime that Apple offers them.
(In theory they could compile JS to a compiled binary that Apple's reviewers are okay with, but I don't know enough about any of that)
And still there are root exploits that are about to go all the way back up
I like react-native, as in the architecture (nativescript has a better bridge). Unfortunately it’s JavaScript. I guess we’ll have to deal with it another 40 years min.
[0] https://github.com/facebook/react-native/issues/25986 and related issues
Scroll down to: How Hermes improves React Native performance
> Hermes today has no JIT compiler. This means that Hermes underperforms some benchmarks, especially those that depend on CPU performance. This was an intentional choice: These benchmarks are generally not representative of mobile application workloads.
What workloads are different from mobile application workloads, other than server-side code?
> Because JITs must warm up when an application starts, they have trouble improving TTI and may even hurt TTI. Also, a JIT adds to native code size and memory consumption, which negatively affects our primary metrics. A JIT is likely to hurt the metrics we care about most, so we chose not to implement a JIT.
So it seems to be specific to their TTI (Time To Interact) metric. A server application generally has the time to warm-up to reach best-performances (pretty common in the java world for example) while a mobile application has to react to user inputs as soon as possible.
I think they exaggerate:
> A JIT is likely to hurt the metrics we care about most
And they ruled out the possibility of having both a JIT and ahead of time compilation.
The speed of a JS vm factoring primes doesn't indicate how laggy it'll feel scrolling through a list because it's garbage collecting every few hundred millis.
that was a while ago though.
code with
80 column hard
limit
looks bad.