1 Create main.c file, and input code like this.
#include <stdio.h>
int main() {
printf("Hello World\n");
return 0;
}
2 Run this image to compile the file.
docker run -t --rm -v `pwd`:/src -w /src xtiqin/emsdk emcc main.c
This will ouput a.out.js and a.out.wasm.
Then we run it use this .
docker run -t --rm -v `pwd`:/src -w /src xtiqin/emsdk node a.out.js
Dockerfile source : https://github.com/plter/Docker/tree/master/emsdk
Content type
Image
Digest
Size
672.4 MB
Last updated
over 7 years ago
docker pull xtiqin/emsdk