Skip to content

Instantly share code, notes, and snippets.

@horitaku1124
Created October 8, 2019 23:12
Show Gist options
  • Save horitaku1124/4e1e248e08230a0347c9922fa1a71393 to your computer and use it in GitHub Desktop.
Save horitaku1124/4e1e248e08230a0347c9922fa1a71393 to your computer and use it in GitHub Desktop.
# docker build -f Dockerfile . -t wasm-builder
# docker run -it -v `pwd`:/root/wasm wasm-builder bash
FROM ubuntu:latest
RUN apt update
RUN apt install -y llvm git python vim libxml2
WORKDIR /root
RUN git clone https://github.com/emscripten-core/emsdk.git
WORKDIR /root/emsdk
RUN ./emsdk install latest
@horitaku1124
Copy link
Author

emcc sample.c -o sample.html -s WASM=1 -s FORCE_FILESYSTEM=1 -s EXIT_RUNTIME=1
emcc sample.c -Os -s WASM=1 -s SIDE_MODULE=1 -o sample.wasm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment