Jump to content

emscripen


James Cat
 Share

Recommended Posts

Hi

Is anyone on here involved with emscripten or using emscripten?

I was hoping to compile some of my core engine stuff to asm.js.

I found it very troublesome to install on ubunto 12.10, even with various step by step guides, and it still only partially works (the node stuff works but the canvas stuff doesn't).

There doesn't seem to be much of an active user community around it, with questions on the issues forum on github unanswered for days.

I sort of thought it was Mozilla's dream JS developer tool for the future, but it doesn't seem like there's that much going on with it...?

James

Link to comment
Share on other sites

It seems that this for now will be very much a mozilla only effort - there is a bug open on chrome's tracker to implement 'use asm' but doesn't seem to be very active. The tech itself is super interesting, but the argument that having various 'use xxx' directives littered around your code leads to mighty confusion also makes sense. 

Link to comment
Share on other sites

I think it's a trade-off, the AOT compiler can only know which parts are safe to do AOT compilation on if it's told, I suppose they could risk having the AOT compilation fail and revert to the JIT route if that happens, but that seems like it would slow things down, for backwards compatability reasons using an unassigned string literal is a fair choice - I think the problem is like when you have C/C++ source code for different platforms, it is full of nasty pre-processor directives which pollute the meaning of the source code and make it hard to follow.

I did get it to work but it's very hard to figure out what will and wont be easy to port, for games the idea is that anything that worked with SDL can quite quickly be ported but some stuff I tried even in the test files didn't seem to work 100% reliably, also the javascript it makes looks horrendous.

There's a project to try and get lljs to compile to asm.js which might be a bit easier for javascript programmers to get the benefits of asm.js, and I read that a typescript -> asm.js compiler is also a possibility, I think I'd prefer either of them, I think C/C++ have their good points but I think they don't map to the event based browser environment very well, so it's hard to imagine writing web apps/games using them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...