MDN/Development/Emscripten: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 24: Line 24:
<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>
<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>


Proposed structure


https://developer.mozilla.org/en-US/docs/Emscripten
        |
        |- Introducing Emscripten
        |- Web abilities and limitations
        |- Workflow and tools
        |- Techniques
        |- Reference
        |- Demos
         
===Introducing Emscripten (always cover the latest version of Emscripten)===


===Introducing Emscripten===
An introduction to Emscripten, including how it works, how to get it set up and start working with it, and some beginner's tutorials. Throughout this section we can reference more detailed guides in later sections.
 
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?
* What is Emscripten and how does it work?
**The nature of Emscripten compiled JS
* The nature of Emscripten compiled JS - brief summary
** non-threading
** async main loop
** async file loading
** memory model
** networking
** performance
* Your first steps with Emscripten
* Your first steps with Emscripten
** Download and install (https://github.com/kripken/emscripten/wiki/Emscripten-SDK, https://github.com/kripken/emscripten/wiki/Getting-started-on-Mac-OS-X, https://github.com/kripken/emscripten/wiki/Getting-Started-on-Ubuntu-12.10, https://github.com/kripken/emscripten/wiki/Using-Emscripten-on-Windows)
** Download and install (https://github.com/kripken/emscripten/wiki/Emscripten-SDK, https://github.com/kripken/emscripten/wiki/Getting-started-on-Mac-OS-X, https://github.com/kripken/emscripten/wiki/Getting-Started-on-Ubuntu-12.10, https://github.com/kripken/emscripten/wiki/Using-Emscripten-on-Windows)
** Hello world (https://github.com/kripken/emscripten/wiki/Tutorial)
** Hello world (https://github.com/kripken/emscripten/wiki/Tutorial, present A minimal GL rendering sample that shows how to get stuff up and running
*** Generating the code
*** Generating the code
*** The asm.js module
*** The asm.js module
Line 40: Line 55:
*** linking
*** linking
*** Emscripten boilerplate
*** Emscripten boilerplate
*** Quick guide to Emscripten compiling, including some essential compiler flags
* Quickstart guide to putting Emscripten in your toolchain
* Next steps
** Emscripten APIs
** Working out what C++ stuff is supported well in Emscripten, and what isn't
** What problems should you solve on the C++ side?
** What should be written in JS and glued on. How is this done?
** https://github.com/kripken/emscripten/wiki/Library-Support ?
** https://github.com/kripken/emscripten/wiki/CodeGuidelinesAndLimitations


===Web abilities and limitations===
===Web abilities and limitations (probably doesn't need to be version-specific)===


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.
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? (https://github.com/kripken/emscripten/wiki/Emscripten-browser-environment)
* How does the web differ to running native code? (https://github.com/kripken/emscripten/wiki/Emscripten-browser-environment)
** non-threading
** non-threading
** async main loop
** async main loop
Line 61: Line 85:
** What does Emscripten rely on?
** What does Emscripten rely on?
** What browsers currently support this combination?
** What browsers currently support this combination?
* C++ landscape support for Emscripten
** Common C++ libraries/technologies that Emscripten handles successfully (provide links forward to more detailed pages in the techniques section)
** https://github.com/kripken/emscripten/wiki/Library-Support ?
** Common C++ libraries/technologies that Emscripten doesn't handle so well
*** https://github.com/kripken/emscripten/wiki/CodeGuidelinesAndLimitations
***What needs to be rewritten in C++
***What is better written from scratch on the JavaScript side?


===Integrating Emscripten into your workflow===
===Workflow and tools===


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?
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?
Line 76: Line 93:
** An ideal toolchain
** An ideal toolchain
** Other alternatives
** Other alternatives
** A minimal GL rendering sample that shows how to get stuff up and running?
* Emscripten in your build system (https://github.com/kripken/emscripten/wiki/Building-Projects)
* Emscripten in your build system (https://github.com/kripken/emscripten/wiki/Building-Projects)
** https://github.com/kripken/emscripten/wiki/Code-Generation-Modes
** https://github.com/kripken/emscripten/wiki/Code-Generation-Modes
Line 128: Line 144:
===Reference documentation===
===Reference documentation===


* Installation instructions
* Compiler reference
* Compiler reference
** Compiler flags list (The most important compiler flags are mentioned in https://github.com/kripken/emscripten/wiki/Tutorial and https://github.com/kripken/emscripten/wiki/Optimizing-Code)
** Compiler flags list (The most important compiler flags are mentioned in https://github.com/kripken/emscripten/wiki/Tutorial and https://github.com/kripken/emscripten/wiki/Optimizing-Code)
* Links to relevant C/C++ library documentation, with annoatations relevant to Emscripten usage
* Links to relevant C/C++ library documentation, with annotations relevant to Emscripten usage
* Links to relevant JS/API documentation, with annotations 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 other relevant docs - Graphics, GLES2?
Line 136: Line 153:
* Emscripten FAQ (https://github.com/kripken/emscripten/wiki/FAQ)
* Emscripten FAQ (https://github.com/kripken/emscripten/wiki/FAQ)


==Raw ideas==
==What should we talk to?==


==What should we talk to?==
Alon, Jukka, Vlad, Martin Best, Dave Herman, Luke Harvey, the rest of the games team!
Confirmed users
228

edits

Navigation menu