Confirmed users
228
edits
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
Although Emscripten can be used to compile a number of different languages into JavaScript, it would make sense to start with C++, as that is the best supported and most useful target laguage for our current projects. The following quote from Jukka provides some good context for the purpose of these docs: | Although Emscripten can be used to compile a number of different languages into JavaScript, it would make sense to start with C++, as that is the best supported and most useful target laguage for our current projects. The following quote from Jukka provides some good context for the purpose of these docs: | ||
<blockquote>My experience and perspective is mainly from the "Game developer who has written a native game in C/C++ for Android/iOS/PC and wants to port it to FxOS/browser" viewpoint. | <blockquote>My experience and perspective is mainly from the "Game developer who has written a native game in C/C++ for Android/iOS/PC and wants to port it to FxOS/browser" viewpoint.</blockquote> | ||
===Introducing Emscripten=== | |||
An introduction to Emscripten, including how it works, how to get it set up and start wqorking with it, and some beginner's tutorials | |||
* What is Emscripten and how does it work? | |||
**The nature of Emscripten compiled JS | |||
* Your first steps with Emscripten | |||
** Download and install | |||
** Hello world | |||
===Web abilities and limitations=== | |||
This could be a single article but may well be multiple articles under a single section as the document resource grows. The main purpose here is to provide native developers trying to research the feasibility of running their project on the web with some answers. | |||
* How does the web differ to runing native code? | |||
** non-threading | |||
** async main loop | |||
** async file loading | |||
** memory model | |||
**networking | |||
** performance | |||
* Performance on the web | |||
** How does it compare to native? | |||
** What are the bottlenecks? | |||
** 3D on the web is slow; how come? | |||
** What kind of sacrifices need to be made when porting to the web, in terms of performance? | |||
* Browser support for Emscripten compiled code | |||
** What does Emscripten rely on? | |||
** What browsers currently support this combination? | |||
* C++ landscape support for Emscripten | |||
** Common C++ libraries/technologies that Emscripten handles successfully | |||
** Common C++ libraries/technologies that Emscripten doesn't handle so well | |||
***What needs to be rewritten in C++ | |||
***What is better written from scratch on the JavaScript side? | |||
===Integrating Emscripten into your workflow=== | |||
As a native developer, how can I get up and running with Emscripten, including it as an additional development target that fits into my existing toolchain? | |||
* Emscripten in your development toolchain | |||
** An ideal toolchain | |||
** Other alternatives | |||
** A minimal GL rendering sample that shows how to get stuff up and running? | |||
* Emscripten in your build system | |||
** Reworking your existing build system to target emscripten | |||
** Co-maintaining both native and emscripten targets simultaneously | |||
** Deploying and running your app on a mobile device | |||
* Debugging Emscripten code output | |||
===Techniques for working with Emscripten=== | |||
More detailed tutorials than you got with the hello world section in the introductory material. | |||
===Reference documentation=== | |||
* Compiler reference | |||
* Links to relevant C/C++ library documentation, with annoatations relevant to Emscripten usage | |||
* Links to relevant JS/API documentation, with annotations relevant to Emscripten usage | |||
* Links to other relevant docs - Graphics, GLES2? | |||
* Links to relevant tool documentation | |||
(disbelief/solving blockers) 10. I have learned about these hard problems (non-threading, async main loop, async file loading, memory model, networking, performance, ...) that I am now able to relate to my own codebase having attempted a port. What can I do? How do I architect around these problems? | (disbelief/solving blockers) 10. I have learned about these hard problems (non-threading, async main loop, async file loading, memory model, networking, performance, ...) that I am now able to relate to my own codebase having attempted a port. What can I do? How do I architect around these problems? |