Emscripten
Author |
Message |
btiffin
|
Posted: Wed Nov 12, 2014 5:57 am Post subject: Emscripten |
|
|
As an old guy, whose first computer, a TRS/80 Model I had 8K of RAM, I'm sad to announce this one.
But not really. There is a gold rush on the horizon.
http://emscripten.org/
code: |
#include<stdio.h>
int main() {
printf("hello, world!\n");
return 0;
}
|
With the encapsulated emsdk, on this machine emcc compiles that C code to 9700 lines of Javascript. Some 360K.
code: |
$ emcc tests/hello_world.c
$ node a.out.js
hello, world!
$ emcc tests/hello_world.c -o hello.html
$ ls -la hello*
-rw-rw-r--. 1 btiffin btiffin 102596 Nov 12 05:50 hello.html
-rw-rw-r--. 1 btiffin btiffin 356065 Nov 12 05:50 hello.js
|
Which runs in the browser with a full featured terminal emulator, running hello world.
In my old guy opinion, who cares about half a meg between friends. Right? Wear a nice suit and tie, run a demo, go for the gold.
Cheers |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Wed Nov 12, 2014 8:13 pm Post subject: RE:Emscripten |
|
|
The project's page already mentions Unity3D, and if one follows the writeups, we'll soon get the hilarity of
C# -> .Net bytecode -> C++ -> JS+webGL
which means 3D gaming in the browser, plugin free. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
|
|