-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebAssembly support? #113
Comments
I'm looking for the same thing. We're developing an app that shares a module that compiles to WASM with a web app, and we're avoiding native module cause of the inability to upgrade via CodePush. Can you share some insights on what the performance hit is with asm.js? |
@Ivshti With expo 33 releasing the new expo-random api, I've been experimenting with running libsodium.js under managed expo. Everything runs smoothy on the emulator, but on my device the app crashes without explanation as soon as Running
From what I can see, the emscripten-compiled libsodium library is attempting to detect the I'd be curious to compare the wasm and asm.js memory usage on a browser to see if there's a big difference. |
JSC's WebAssembly support relies on FTL JIT which we disabled for memory usage and binary size. |
My latest investigation is WebAssembly is supported on JSC iOS Device, but not on JSC iOS Emulator. |
WebAssembly works on both JSC iOS Device and JSC iOS Emulator (for iOS 14). It doesn't work on JSC Android at all. |
ios 15.2 simulator works with webassembly but real device with the same version fails with “Can’t find variable: WebAssembly” any clue how to solve it? |
That's so strange. AFAIK WebKit never removed support for WebAssembly. Why would it not be able to find WebAssembly...? |
Isn’t JSC used by default? Is there any reason why Simulator and Real device would use something different? I’ve seen a similar issue being commented here: https://forum.dfinity.org/t/making-http-calls-from-mobile-apps/5192/33 |
Yeah, JSC is used by default. I have no idea why they'd be different. Is your simulator also using iOS 15.2, or is it 15.3 or something else? WebAssembly is definitely supported by Safari 15.2, which is the version of Safari that's bundled by default with iOS 15.2 https://webkit.org/blog/12140/new-webkit-features-in-safari-15-2/ I can't imagine they removed WebAssembly from the JS globals either. In fact, on stackoverflow, I can see other developers are indeed running wasm apps on iOS 15. Have you tried on a different iOS device by any chance? (I will try with one as well once I get a chance.) |
Yes, I’m running the same version (15.2) on the simulator and the device. I will try on another device and report back.
…Sent from my iPhone
On 21. Jan 2022, at 08:53, jzxchiang1 ***@***.***> wrote:
Yeah, JSC is used by default. I have no idea why they'd be different. Is your simulator also using iOS 15.2, or is it 15.3 or something else?
WebAssembly is definitely supported by Safari 15.2, which is the version of Safari that's bundled by default with iOS 15.2 https://webkit.org/blog/12140/new-webkit-features-in-safari-15-2/
I can't imagine they removed WebAssembly from the JS globals either. In fact, on stackoverflow, I can see other developers are indeed running wasm apps on iOS 15. Have you tried on a different iOS device by any chance? (I will try with one as well once I get a chance.)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.
|
I could not get my hands on another device yet, but I filed a report with Apple and this is their answer: React-Native is using JavaScriptCore.framework, and it does not have JIT. |
Wow, can you ask them why it works on iOS 14 but not 15? And why it works on iOS Simulator but not an iPhone device? I'd be very curious to see a link to the report, if it's public. Thanks. |
this aligns to my understandings. for security reason, ios has |
That's strange. I've called WebAssembly from within RN JS on my iPhone SE (iOS 14.6) device in both debug and release mode, and it's worked. I wonder if they added JIT support in iOS 14.2 and then removed it again in iOS 15? EDIT: From reading that thread you linked, I think it might also be because my app was built using XCode for local development. Apparently once you send the final app to the App Store, then JIT permissions are removed... |
Will jsc-android include WebAssembly support?
From what I can see, WebAssembly seems to be explicitly disabled in jsc-android, but appears to be supported by the current JavascriptCore. Is there any intention to remove the
--no-webassembly
flag from jsc-android?My own motivation is to run emscripten-compiled modules in react-native. Unfortunately they aren't performing well under emscripten's fallback to asm.js.
The text was updated successfully, but these errors were encountered: