How to test and develop with asm.js?

2020-06-17 03:35发布

问题:

Recently I read asm.js spec and it seems cool but is there any environment/tool to develop and test this tool or not? Is that still on spec phase only?

回答1:

You can try it by using emscripten with ASM_JS=1 and running it in a firefox build from a side branch. Links and more instructions are in these slides about asm.js, http://kripken.github.com/mloc_emscripten_talk/#/



回答2:

Use the '-s' command line option of the compiler, like thus:

./emcc -O1 -s ASM_JS=1 tests/hello_world.c