[go: nahoru, domu]

Skip to content

Commit

Permalink
Auto merge of #742 - alexcrichton:wasm, r=alexcrichton
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
bors committed Aug 27, 2017
2 parents 2f4ca87 + f2ebd04 commit 3713825
Show file tree
Hide file tree
Showing 27 changed files with 2,731 additions and 677 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ matrix:
- env: TARGET=mips64-unknown-linux-gnuabi64
- env: TARGET=mips-unknown-linux-gnu
- env: TARGET=s390x-unknown-linux-gnu
- env: TARGET=asmjs-unknown-emscripten
- env: TARGET=wasm32-unknown-emscripten

# beta
- env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
Expand Down
237 changes: 218 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions ci/docker/asmjs-unknown-emscripten/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:16.04

RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gcc \
git \
libc6-dev \
python \
xz-utils

COPY emscripten.sh /
RUN bash /emscripten.sh

ENV PATH=$PATH:/rust/bin \
CARGO_TARGET_ASMJS_UNKNOWN_EMSCRIPTEN_RUNNER=node

COPY emscripten-entry.sh /
ENTRYPOINT ["/emscripten-entry.sh"]
21 changes: 21 additions & 0 deletions ci/docker/wasm32-unknown-emscripten/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:16.04

RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gcc \
git \
libc6-dev \
python \
xz-utils

COPY emscripten.sh /
RUN bash /emscripten.sh

ENV PATH=$PATH:/rust/bin \
CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node-wrapper.sh

COPY emscripten-entry.sh /
COPY docker/wasm32-unknown-emscripten/node-wrapper.sh /usr/local/bin/node-wrapper.sh
ENTRYPOINT ["/emscripten-entry.sh"]
11 changes: 11 additions & 0 deletions ci/docker/wasm32-unknown-emscripten/node-wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

set -e

me=$1
shift
dir=$(dirname $me)
file=$(basename $me)

cd $dir
exec node $file "$@"
19 changes: 19 additions & 0 deletions ci/emscripten-entry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/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.

set -ex

source /emsdk-portable/emsdk_env.sh &> /dev/null

# emsdk-portable provides a node binary, but we need version 8 to run wasm
export PATH="/node-v8.0.0-linux-x64/bin:$PATH"

exec "$@"
Loading

0 comments on commit 3713825

Please sign in to comment.