MDN/Development/Emscripten: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 29: Line 29:
**The nature of Emscripten compiled JS
**The nature of Emscripten compiled JS
* Your first steps with Emscripten
* Your first steps with Emscripten
** Download and install
** 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
** Hello world (https://github.com/kripken/emscripten/wiki/Tutorial)
*** Generating the code
*** Generating the code
*** The asm.js module
*** The asm.js module
Line 41: Line 41:
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?
* How does the web differ to runing native code? (https://github.com/kripken/emscripten/wiki/Emscripten-browser-environment)
** non-threading
** non-threading
** async main loop
** async main loop
** async file loading
** async file loading
** memory model
** memory model
** https://github.com/kripken/emscripten/wiki/Browser-limitations
**networking
**networking
** performance
** performance
Line 58: Line 59:
* C++ landscape support for Emscripten
* C++ landscape support for Emscripten
** Common C++ libraries/technologies that Emscripten handles successfully (provide links forward to more detailed pages in the techniques section)
** 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
** 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 needs to be rewritten in C++
***What is better written from scratch on the JavaScript side?
***What is better written from scratch on the JavaScript side?
Line 70: Line 73:
** Other alternatives
** Other alternatives
** A minimal GL rendering sample that shows how to get stuff up and running?
** A minimal GL rendering sample that shows how to get stuff up and running?
* Emscripten in your build system
* Emscripten in your build system (https://github.com/kripken/emscripten/wiki/Building-Projects)
** https://github.com/kripken/emscripten/wiki/Code-Generation-Modes
** Reworking your existing build system to target emscripten
** Reworking your existing build system to target emscripten
** Co-maintaining both native and emscripten targets simultaneously
** Co-maintaining both native and emscripten targets simultaneously
Line 76: Line 80:
** Installable app packaging
** Installable app packaging
** Mobile runtime quirks
** Mobile runtime quirks
* Debugging Emscripten code output
* Debugging Emscripten code output (https://github.com/kripken/emscripten/wiki/Debugging)


===Techniques for working with Emscripten===
===Techniques for working with Emscripten===
Line 88: Line 92:
** OpenAL
** OpenAL
** EGL (see https://github.com/kripken/emscripten/wiki/EGL-Support-in-Emscripten for a good example)
** EGL (see https://github.com/kripken/emscripten/wiki/EGL-Support-in-Emscripten for a good example)
** OPENGL (https://github.com/kripken/emscripten/wiki/OpenGL-support)
** GLES2
** GLES2
** https://github.com/kripken/emscripten/wiki/GC
** https://github.com/kripken/emscripten/wiki/Linking
** others...
** others...
* Architecting around common problems - provide a case study for each? (Currently we do have some examples of "how do I do X in Emscripten" as part of the unit test suite, but naturally that's not a good format for reading as a documentation/learning material. Some of those could be hoisted or used as a basis for a better set of example apps.)
* Architecting around common problems - provide a case study for each? (Currently we do have some examples of "how do I do X in Emscripten" as part of the unit test suite, but naturally that's not a good format for reading as a documentation/learning material. Some of those could be hoisted or used as a basis for a better set of example apps.)
Line 94: Line 101:
** non-threading
** non-threading
** async main loop (async compilation is already covered at https://developer.mozilla.org/en-US/docs/Games/Techniques/Async_scripts. Perhaps include some extra explanation about what's going on inside the JS engine?)
** async main loop (async compilation is already covered at https://developer.mozilla.org/en-US/docs/Games/Techniques/Async_scripts. Perhaps include some extra explanation about what's going on inside the JS engine?)
** async file loading
** async file loading (https://github.com/kripken/emscripten/wiki/Filesystem-Guide, https://github.com/kripken/emscripten/wiki/Filesystem-API)
** memory model
** memory model
** networking
** networking
** performance
** performance
** https://github.com/kripken/emscripten/wiki/Asm-pointer-casts
** https://github.com/kripken/emscripten/wiki/Synchronous-Virtual-XHR-Backed-File-System-Usage
* Emscripten APIs (see https://github.com/kripken/emscripten/blob/master/system/include/emscripten/emscripten.h)
* Emscripten APIs (see https://github.com/kripken/emscripten/blob/master/system/include/emscripten/emscripten.h)
** x
** Embind (https://github.com/kripken/emscripten/wiki/embind)
** y
** y
** z
** z
* Combining handspun JavaScript with Emscripten code
* Combining handspun JavaScript with Emscripten code (https://github.com/kripken/emscripten/wiki/Interacting-with-code)
** Developing a JS library to solve problem X
** Developing a JS library to solve problem X
** Gluing it to your Emscripten application
** Gluing it to your Emscripten application
* Benchmarking, profiling and optimization
* Benchmarking, profiling and optimization
** e.g. minimizing data sizes
** e.g. minimizing data sizes (https://github.com/kripken/emscripten/wiki/Compressing-Downloads)
** optimize web transfers?
** optimize web transfers?
** optimizing generated code (https://github.com/kripken/emscripten/wiki/Optimizing-Code, https://github.com/kripken/emscripten/wiki/Optimizing-the-source-code)
* Creating the launch experience
* Creating the launch experience
** Creating a start page
** Creating a start page
Line 120: Line 130:
* Links to other relevant docs - Graphics, GLES2?
* Links to other relevant docs - Graphics, GLES2?
* Links to relevant tool documentation
* Links to relevant tool documentation
* Emscripten FAQ (https://github.com/kripken/emscripten/wiki/FAQ)


==Raw ideas==
==Raw ideas==


==What should we talk to?==
==What should we talk to?==
Confirmed users
228

edits