Created
October 8, 2019 23:12
-
-
Save horitaku1124/4e1e248e08230a0347c9922fa1a71393 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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
https://emscripten.org/docs/getting_started/downloads.html
https://qiita.com/takao_mofumofu/items/e0937103253c473ca485