dockerfiles/rust-cargo-web

22 lines
555 B
Plaintext

FROM rust:1.44.0
# Install clang, nodejs
RUN apt-get update && \
apt-get install -y libclang-dev nodejs && \
rm -rf /var/lib/apt/lists/*
# Install toolchains
RUN rustup target add asmjs-unknown-emscripten
RUN rustup target add wasm32-unknown-emscripten
RUN rustup target add wasm32-unknown-unknown
# Install cargo-web
ENV CARGO_WEB_VERSION=0.6.26
RUN cargo install --version $CARGO_WEB_VERSION cargo-web
# Install wasm-pack
ENV WASM_PACK_VERSION=0.8.1
RUN cargo install --version $WASM_PACK_VERSION wasm-pack
RUN cargo web prepare-emscripten