asm.js running on iOS?

926 views
Skip to first unread message

Stéphane Letz

unread,
Sep 16, 2015, 6:43:47 AM9/16/15
to emscripten-discuss
Hi,

Can asm.js code be run on iOS ? (Safari ? Chrome? anything else?)

Thanks.

Stéphane Letz

Jukka Jylänki

unread,
Sep 16, 2015, 8:51:36 AM9/16/15
to emscripte...@googlegroups.com
Yes, since asm.js is just a flavor of standard JavaScript, asm.js code can run on iOS browsers.

There exists a WebKit blog entry about their FTL JIT, which optimizes for asm.js style of code: https://www.webkit.org/blog/3362/introducing-the-webkit-ftl-jit/ . Safari 8 should have that enabled (as well as having WebGL enabled)

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stéphane Letz

unread,
Sep 16, 2015, 9:43:50 AM9/16/15
to emscripten-discuss
Then could the WebKit asm.js engine be used be a "home made application" (not Safari…), so to run our own generated asm.js code?

Thanks.


Le mercredi 16 septembre 2015 14:51:36 UTC+2, jj a écrit :
Yes, since asm.js is just a flavor of standard JavaScript, asm.js code can run on iOS browsers.

There exists a WebKit blog entry about their FTL JIT, which optimizes for asm.js style of code: https://www.webkit.org/blog/3362/introducing-the-webkit-ftl-jit/ . Safari 8 should have that enabled (as well as having WebGL enabled)
2015-09-16 13:43 GMT+03:00 Stéphane Letz <le...@free.fr>:
Hi,

Can asm.js code be run on iOS ? (Safari ? Chrome? anything else?)

Thanks.

Stéphane Letz

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

Brion Vibber

unread,
Sep 16, 2015, 11:37:17 AM9/16/15
to emscripten Mailing List
Note that to get good performance you'll need to host the JS/HTML in a WKWebView, not UIWebView. (The older UIWebView disables the JIT compiler.) With WKWebView you should get about the same performance as in Safari, which is pretty decent on 64-bit (A7 and later CPUs).

-- brion

To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

Stéphane Letz

unread,
Sep 16, 2015, 12:02:31 PM9/16/15
to emscripten-discuss
Will we be able to "inject" an asm.js module (as a string) that we produce with our Domain Specific Language compiler in WebKit JS engine and get if compiled and usable ?

(we basically try to dynamically compile our own code on iOS, tried the LLVM JIT path, up to the point we discover that LLVM JIT machine code could not be executed on iOS in the final application….it was only working when running from Xcode…)

Thanks

Le mercredi 16 septembre 2015 17:37:17 UTC+2, Brion Vibber a écrit :
Note that to get good performance you'll need to host the JS/HTML in a WKWebView, not UIWebView. (The older UIWebView disables the JIT compiler.) With WKWebView you should get about the same performance as in Safari, which is pretty decent on 64-bit (A7 and later CPUs).

-- brion
On Wed, Sep 16, 2015 at 6:43 AM, Stéphane Letz <le...@free.fr> wrote:
Then could the WebKit asm.js engine be used be a "home made application" (not Safari…), so to run our own generated asm.js code?

Thanks.


Le mercredi 16 septembre 2015 14:51:36 UTC+2, jj a écrit :
Yes, since asm.js is just a flavor of standard JavaScript, asm.js code can run on iOS browsers.

There exists a WebKit blog entry about their FTL JIT, which optimizes for asm.js style of code: https://www.webkit.org/blog/3362/introducing-the-webkit-ftl-jit/ . Safari 8 should have that enabled (as well as having WebGL enabled)
2015-09-16 13:43 GMT+03:00 Stéphane Letz <le...@free.fr>:
Hi,

Can asm.js code be run on iOS ? (Safari ? Chrome? anything else?)

Thanks.

Stéphane Letz

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

Brion Vibber

unread,
Sep 16, 2015, 12:15:42 PM9/16/15
to emscripten Mailing List
Same as any other JavaScript code, sure. asm.js is just a subset of JavaScript.

-- brion

On Wed, Sep 16, 2015 at 9:02 AM, Stéphane Letz <le...@free.fr> wrote:
Will we be able to "inject" an asm.js module (as a string) that we produce with our Domain Specific Language compiler in WebKit JS engine and get if compiled and usable ?

(we basically try to dynamically compile our own code on iOS, tried the LLVM JIT path, up to the point we discover that LLVM JIT machine code could not be executed on iOS in the final application….it was only working when running from Xcode…)

Thanks

Le mercredi 16 septembre 2015 17:37:17 UTC+2, Brion Vibber a écrit :
Note that to get good performance you'll need to host the JS/HTML in a WKWebView, not UIWebView. (The older UIWebView disables the JIT compiler.) With WKWebView you should get about the same performance as in Safari, which is pretty decent on 64-bit (A7 and later CPUs).

-- brion
On Wed, Sep 16, 2015 at 6:43 AM, Stéphane Letz <le...@free.fr> wrote:
Then could the WebKit asm.js engine be used be a "home made application" (not Safari…), so to run our own generated asm.js code?

Thanks.


Le mercredi 16 septembre 2015 14:51:36 UTC+2, jj a écrit :
Yes, since asm.js is just a flavor of standard JavaScript, asm.js code can run on iOS browsers.

There exists a WebKit blog entry about their FTL JIT, which optimizes for asm.js style of code: https://www.webkit.org/blog/3362/introducing-the-webkit-ftl-jit/ . Safari 8 should have that enabled (as well as having WebGL enabled)
2015-09-16 13:43 GMT+03:00 Stéphane Letz <le...@free.fr>:
Hi,

Can asm.js code be run on iOS ? (Safari ? Chrome? anything else?)

Thanks.

Stéphane Letz

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages