You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
1.3 KiB

==================================
Status of Emscripten compatibility
==================================
Hello world test
================
Quick hello world test::
$ ./emcc -s USE_TYPED_ARRAYS=0 \
tests/hello_world.cpp -o /tmp/duk-emcc-test.js
Options needed:
* ``-s USE_TYPED_ARRAYS=0``: needed because Duktape does not yet support
Javascript typed arrays. Without this the Emscripten won't be able to
create an array for simulating memory. Note that without typed arrays,
Emscripten code will run very slow and be very memory inefficient.
Normally this suffices. If you're running Duktape with a small amount of
memory (e.g. when running the Duktape command line tool with the ``-r``
option) you may need to reduce Emscription "virtual memory" size with the
following additional options:
* ``-s TOTAL_MEMORY=2097152``: reduce total memory size to avoid running
out of memory.
* ``-s TOTAL_STACK=524288``: reduce total stack size to fit it into the
reduced memory size.
There used to be an invalid RegExp expression in the Emscripten output:
a few curly braces were used as plain literals, which is technically a
SyntaxError although it is accepted by several engines. This has now been
fixed in the Emscripten repository. If you encounter this issue, see
``fix_emscripten.py`` for details.