Compiling LLJS to asm.js
jlongster.com
Compiling LLJS to asm.js
1–10 of 35 posts
Re: Compiling LLJS to asm.js
#2EDIT: to clarify, the ideal solution would be an editor (like codemirror or ace) with a compile+run button that would compile the code down to JS and run it.
Re: Compiling LLJS to asm.js
#3Has anyone built the entire stack in javascript (C to JS compiler in JS + standard library) so that you could write JS applications in C and compile and run in the browser? EDIT: to clarify, the ideal solution would be an editor (like codemirror or ace) with a compile+run button that would compile the code down to JS and run it.
Re: Compiling LLJS to asm.js
#4Has anyone built the entire stack in javascript (C to JS compiler in JS + standard library) so that you could write JS applications in C and compile and run in the browser? EDIT: to clarify, the ideal solution would be an editor (like codemirror or ace) with a compile+run button that would compile the code down to JS and run it.
https://github.com/kripken/emscripten
See the BananaBread demo: https://developer.mozilla.org/en-US/demos/detail/bananabread
Re: Compiling LLJS to asm.js
#5Has anyone built the entire stack in javascript (C to JS compiler in JS + standard library) so that you could write JS applications in C and compile and run in the browser? EDIT: to clarify, the ideal solution would be an editor (like codemirror or ace) with a compile+run button that would compile the code down to JS and run it.
https://github.com/kripken/emscripten/wiki
Re: Compiling LLJS to asm.js
#6Has anyone built the entire stack in javascript (C to JS compiler in JS + standard library) so that you could write JS applications in C and compile and run in the browser? EDIT: to clarify, the ideal solution would be an editor (like codemirror or ace) with a compile+run button that would compile the code down to JS and run it.
That's exactly what emscripten does, and is very mature and being used to port massive 3d games to the web. https://github.com/kripken/emscripten See the BananaBread demo: https://developer.mozilla.org/en-US/demos/detail/bananabread
The ideal solution would be an editor (like codemirror or ace) with a compile+run button that would compile the code down to JS and run it.
Re: Compiling LLJS to asm.js
#7Earlier quoted context omitted.
That's exactly what emscripten does, and is very mature and being used to port massive 3d games to the web. https://github.com/kripken/emscripten See the BananaBread demo: https://developer.mozilla.org/en-US/demos/detail/bananabread
You have to use the command-line `emcc` tool to do this. I'm asking if that tool can be eliminated from the workflow. The ideal solution would be an editor (like codemirror or ace) with a compile+run button that would compile the code down to JS and run it.
The shorter path is something like LLVM, but we could see something like a compiler all in js that can take a large subset of C and compile it.
EDIT: see azakai's comment below which provides much better insight into this
Re: Compiling LLJS to asm.js
#8Earlier quoted context omitted.
https://github.com/kripken/emscripten/wiki
That's LLVM -> JS. Has anyone built Clang using emscripten (that would be the C -> LLVM piece)?
Re: Compiling LLJS to asm.js
#9Has anyone built the entire stack in javascript (C to JS compiler in JS + standard library) so that you could write JS applications in C and compile and run in the browser? EDIT: to clarify, the ideal solution would be an editor (like codemirror or ace) with a compile+run button that would compile the code down to JS and run it.
That's exactly what emscripten does, and is very mature and being used to port massive 3d games to the web. https://github.com/kripken/emscripten See the BananaBread demo: https://developer.mozilla.org/en-US/demos/detail/bananabread