react-native-v8 icon indicating copy to clipboard operation
react-native-v8 copied to clipboard

How can I support iOS?

Open uiue opened this issue 4 years ago • 8 comments

How can I support iOS, our app is an enterprise app, no need to go to the app store.

uiue avatar Aug 02 '19 02:08 uiue

Just curious for the intention to use V8 on iOS. V8 on iOS is relatively new and landed after V8 7.5: https://v8.dev/docs/cross-compile-ios. JSC also optimizes JIT for ARM64E devices which performance may be better than V8 on iOS.

Kudo avatar Aug 02 '19 07:08 Kudo

I saw this article on performance issues, maybe the iOS version of JSC has the same problem? https://dev.to/anotherjsguy/react-native-memory-profiling-jsc-vs-v8-vs-hermes-1c76

uiue avatar Aug 05 '19 06:08 uiue

IMHO, that is the case specific for Android. JS engine has many configurations and jsc-android only enable Baseline JIT. However, builtin JSC on iOS should enable all JIT tiers and Apple did implement some optimizations specific for iOS. I was thinking the JSC performance on iOS should be better.

Kudo avatar Aug 06 '19 03:08 Kudo

iOS JSC not open JIT feature. Our app doesn't need to be on the Apple Store, so we don't need Apple to review, we want to open JIT.

uiue avatar Aug 08 '19 01:08 uiue

It makes sense. Thank you that I just realized that iOS built in JSC is JIT-less.

However, I have no short term plan to support iOS. An alternative solution for your reference, to have custom build JavaScriptCore.Framework and link RN iOS to the custom framework. That might be a way to have JIT enabled JavaScriptCore.

Kudo avatar Aug 09 '19 08:08 Kudo

JIT cannot be enabled in iOS at all, since all allocated memory on iOS is W^X (except safari, it gets special treatment) But at the same time, being able to use V8 on iOS would be very interesting. @Kudo : Would you be interested in merging support for iOS if I worked on it?

akshetpandey avatar Nov 09 '19 01:11 akshetpandey

@radex talked with me for iOS support just few days ago. Last weekend I took some time to do this and had some work 🎉 Simulator Screen Shot - iPhone Xʀ - 2019-11-12 at 20 42 03

However, it takes some tweaks to integrate into existing project. I created an umbrella issue to list tasks for real library delivery. #31 Please give comment there if you have any thought and contribution is always welcome.

Kudo avatar Nov 13 '19 01:11 Kudo

thanks, pushing to prod

osdnk avatar Dec 10 '19 23:12 osdnk