|
1 | 1 | #babel-plugin-asm-js
|
2 | 2 |
|
3 |
| -Compile JavaScript + Flow into asm.js |
| 3 | +Compiles statically typed ES6 (Flow-flavoured) module into asm.js while preserving ES6 module interface. Still a subset of JavaScript, but much more suitable for hand-writing (so that you don't need to use C/C++ -> Emscripten -> asm.js for maths) |
| 4 | + |
| 5 | +Work in progress. |
| 6 | + |
| 7 | +##Currently supported: |
| 8 | + |
| 9 | +* ES6`import` and named`export` |
| 10 | +* automatic`var`,`let`,`const` extraction and conversion |
| 11 | +* automatic function layout |
| 12 | +* function parameter annotations |
| 13 | +* function return type annotation |
| 14 | +* assignment with automatic type conversion |
| 15 | +* Flow type cast into asm.js type cast |
| 16 | +* automatic asm.js imports for stdlib and foreign references |
| 17 | +* automatic program layout |
| 18 | +* automatic wrapping into asm.js module with`initialize` for passing own`heap` |
| 19 | + |
| 20 | +##TODO: |
| 21 | + |
| 22 | +* bug fixing |
| 23 | +* global variable support |
| 24 | +* string support (literals are already converted to IDs, need to support operations) |
| 25 | +* better asm.js<->normal code communication |
| 26 | +* limited object and array support |
4 | 27 |
|
5 | 28 | ##Installation
|
6 | 29 |
|
|