User Tools

Site Tools


hello.c
#include <stdio.h>
 
int main(int argc, char ** argv) {
  printf("Hello World\n");
}
$ time emcc hello.c -s WASM=1 -o hello.html
cache:INFO: generating system asset: is_vanilla.txt... (this will be cached in "/home/xxxx/.emscripten_cache/is_vanilla.txt" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libc.a... (this will be cached in "/home/xxxx/.emscripten_cache/wasm-obj/libc.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libcompiler_rt.a... (this will be cached in "/home/xxxx/.emscripten_cache/wasm-obj/libcompiler_rt.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libc-wasm.a... (this will be cached in "/home/xxxx/.emscripten_cache/wasm-obj/libc-wasm.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libdlmalloc.a... (this will be cached in "/home/xxxx/.emscripten_cache/wasm-obj/libdlmalloc.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libpthread_stub.a... (this will be cached in "/home/xxxx/.emscripten_cache/wasm-obj/libpthread_stub.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libc_rt_wasm.a... (this will be cached in "/home/xxxx/.emscripten_cache/wasm-obj/libc_rt_wasm.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libsockets.a... (this will be cached in "/home/xxxx/.emscripten_cache/wasm-obj/libsockets.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system asset: generated_struct_info.json... (this will be cached in "/home/xxxx/.emscripten_cache/wasm-obj/generated_struct_info.json" for subsequent builds)
cache:INFO:  - ok

real	3m18.703s
user	10m44.861s
sys	1m22.131s

-rw-r--r--  1 xxxx  wheel      85 Feb 15 11:17 hello.c
-rw-r--r--  1 xxxx  wheel  102675 Feb 15 11:21 hello.html
-rw-r--r--  1 xxxx  wheel  111753 Feb 15 11:21 hello.js
-rw-r--r--  1 xxxx  wheel   21830 Feb 15 11:21 hello.wasm