Kudo / react-native-v8

Opt-in V8 runtime for React Native Android
MIT License
917 stars 69 forks source link

How can I support iOS? #8

Open uiue opened 5 years ago

uiue commented 5 years ago

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

Kudo commented 5 years ago

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.

uiue commented 5 years ago

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

Kudo commented 5 years ago

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.

uiue commented 5 years ago

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.

Kudo commented 5 years ago

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.

akshetpandey commented 4 years ago

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?

Kudo commented 4 years ago

@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.

osdnk commented 4 years ago

thanks, pushing to prod