webassembly
1. Install
brew install cmake git clone https://github.com/emscripten-core/emsdk.git cd emsdk ./emsdk install --build=Release sdk-incoming-64bit binaryen-master-64bit ./emsdk activate --build=Release sdk-incoming-64bit binaryen-master-64bit source ./emsdk_env.sh --build=Release
2. hello.c
$ cat << EOF > hello.c #include <stdio.h> int main(int argc, char ** argv) { printf("Hello, world!\n"); } EOF
3. compile
emcc hello.c -s WASM=1 -o hello.html
4. server run
emrun --no_browser --port 8080 .