forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker image for wasm32-unknown-emscripten
- rename emscripten docker image to asmjs - create wasm32 docker image
- Loading branch information
Showing
6 changed files
with
107 additions
and
95 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
g++ \ | ||
make \ | ||
file \ | ||
curl \ | ||
ca-certificates \ | ||
python \ | ||
git \ | ||
cmake \ | ||
sudo \ | ||
gdb \ | ||
xz-utils | ||
|
||
# dumb-init | ||
COPY scripts/dumb-init.sh /scripts/ | ||
RUN sh /scripts/dumb-init.sh | ||
|
||
# emscripten | ||
COPY scripts/emscripten.sh /scripts/ | ||
RUN bash /scripts/emscripten.sh | ||
|
||
# env | ||
ENV PATH=$PATH:/emsdk-portable | ||
ENV PATH=$PATH:/emsdk-portable/clang/e1.37.13_64bit/ | ||
ENV PATH=$PATH:/emsdk-portable/emscripten/1.37.13/ | ||
ENV PATH=$PATH:/emsdk-portable/node/4.1.1_64bit/bin/ | ||
ENV EMSCRIPTEN=/emsdk-portable/emscripten/1.37.13/ | ||
ENV BINARYEN_ROOT=/emsdk-portable/clang/e1.37.13_64bit/binaryen/ | ||
ENV EM_CONFIG=/emsdk-portable/.emscripten | ||
|
||
ENV TARGETS=asmjs-unknown-emscripten | ||
|
||
ENV RUST_CONFIGURE_ARGS --target=$TARGETS | ||
|
||
ENV SCRIPT python2.7 ../x.py test --target $TARGETS | ||
|
||
# cache | ||
COPY scripts/sccache.sh /scripts/ | ||
RUN sh /scripts/sccache.sh | ||
|
||
# init | ||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
g++ \ | ||
make \ | ||
file \ | ||
curl \ | ||
ca-certificates \ | ||
python \ | ||
git \ | ||
cmake \ | ||
sudo \ | ||
gdb \ | ||
xz-utils | ||
|
||
# dumb-init | ||
COPY scripts/dumb-init.sh /scripts/ | ||
RUN sh /scripts/dumb-init.sh | ||
|
||
# emscripten | ||
COPY scripts/emscripten.sh /scripts/ | ||
RUN bash /scripts/emscripten.sh | ||
COPY wasm32/node /usr/local/bin/node | ||
|
||
# env | ||
ENV PATH=$PATH:/emsdk-portable | ||
ENV PATH=$PATH:/emsdk-portable/clang/e1.37.13_64bit/ | ||
ENV PATH=$PATH:/emsdk-portable/emscripten/1.37.13/ | ||
ENV EMSCRIPTEN=/emsdk-portable/emscripten/1.37.13/ | ||
ENV BINARYEN_ROOT=/emsdk-portable/clang/e1.37.13_64bit/binaryen/ | ||
ENV EM_CONFIG=/emsdk-portable/.emscripten | ||
|
||
ENV TARGETS=wasm32-unknown-emscripten | ||
|
||
ENV RUST_CONFIGURE_ARGS --target=$TARGETS | ||
|
||
ENV SCRIPT python2.7 ../x.py test --target $TARGETS | ||
|
||
# cache | ||
COPY scripts/sccache.sh /scripts/ | ||
RUN sh /scripts/sccache.sh | ||
|
||
# init | ||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT | ||
# file at the top-level directory of this distribution and at | ||
# http://rust-lang.org/COPYRIGHT. | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
path="$(dirname $1)" | ||
file="$(basename $1)" | ||
|
||
shift | ||
|
||
cd "$path" | ||
exec /node-v8.0.0-linux-x64/bin/node "$file" "$@" |