wasm icon indicating copy to clipboard operation
wasm copied to clipboard

No JIT on iOS

Open modulovalue opened this issue 2 years ago • 1 comments

iOS platforms do not support certain primitives needed for fast JITing in applications distributed through the App Store. JITing is needed for a fast wasm runtime.

Wasmer added support for precompilation through which wasm can be compiled to a dylib and that dylib can then be bundled with applications to allow distribution through the App Store.

There are other wasm runtimes that interpret wasm and do not depend on JITing. The catch is that they are slower than JITed runtimes and I'm not sure if applications that interpret wasm are allowed on the App Store.

So either:

  • the API for compiling wasm will need to be adjusted to support precompilation on iOS platforms
  • or wasm will need to be intrepreted on iOS through e.g. wasm3
  • or we'll have to wait until Apple adds first party wasm support (I have no reason to assume that they have plans to do so)
  • or no iOS support

modulovalue avatar Jan 31 '23 00:01 modulovalue

So apparently no JIT doesn't necessarily mean abysmal performance.

https://microsoftedge.github.io/edgevr/posts/Super-Duper-Secure-Mode/

Microsoft is supporting a JIT-free mode for Edge with what looks like not much slower benchmarks.

Maybe wasm3 could indeed be a viable alternative. They also claim that it can be built in seconds which would address #113

modulovalue avatar Feb 08 '23 02:02 modulovalue