Skip to content

Commit aca0886

Browse files
committed
Auto merge of #742 - alexcrichton:wasm, r=alexcrichton
Add asmjs/wasm32 to CI Rebase of #610 and also move emscripten up much higher in the hierarchy to ensure that it doesn't have too much of a ripple effect on other platforms. This involved moving down a good number of definitions, but hopefully was done with care to not break anything!
2 parents 2f4ca87 + 70e4784 commit aca0886

File tree

22 files changed

+2644
-596
lines changed

22 files changed

+2644
-596
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ matrix:
7070
- env: TARGET=mips64-unknown-linux-gnuabi64
7171
- env: TARGET=mips-unknown-linux-gnu
7272
- env: TARGET=s390x-unknown-linux-gnu
73+
- env: TARGET=asmjs-unknown-emscripten
74+
- env: TARGET=wasm32-unknown-emscripten
7375

7476
# beta
7577
- env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1

Cargo.lock

Lines changed: 218 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && \
4+
apt-get install -y --no-install-recommends \
5+
ca-certificates \
6+
curl \
7+
gcc \
8+
git \
9+
libc6-dev \
10+
python \
11+
xz-utils
12+
13+
COPY emscripten.sh /
14+
RUN bash /emscripten.sh
15+
16+
ENV PATH=$PATH:/rust/bin \
17+
CARGO_TARGET_ASMJS_UNKNOWN_EMSCRIPTEN_RUNNER=node
18+
19+
COPY emscripten-entry.sh /
20+
ENTRYPOINT ["/emscripten-entry.sh"]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && \
4+
apt-get install -y --no-install-recommends \
5+
ca-certificates \
6+
curl \
7+
gcc \
8+
git \
9+
libc6-dev \
10+
python \
11+
xz-utils
12+
13+
COPY emscripten.sh /
14+
RUN bash /emscripten.sh
15+
16+
ENV PATH=$PATH:/rust/bin \
17+
CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node-wrapper.sh
18+
19+
COPY emscripten-entry.sh /
20+
COPY docker/wasm32-unknown-emscripten/node-wrapper.sh /usr/local/bin/node-wrapper.sh
21+
ENTRYPOINT ["/emscripten-entry.sh"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
me=$1
6+
shift
7+
dir=$(dirname $me)
8+
file=$(basename $me)
9+
10+
cd $dir
11+
exec node $file "$@"

ci/emscripten-entry.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
source /emsdk-portable/emsdk_env.sh &> /dev/null
15+
16+
# emsdk-portable provides a node binary, but we need version 8 to run wasm
17+
export PATH="/node-v8.0.0-linux-x64/bin:$PATH"
18+
19+
exec "$@"

0 commit comments

Comments
 (0)