Minimal docker image for rust to wasm compilation. https://github.com/OpenGG/docker-rust-wasm/
610
Minimal docker image for rust to wasm compilation.
Based on Compiling Rust to Wasm manually with the LLVM wasm-backend (without Emscripten)
First, prepare your rust source file, e.g. add.rs.
#[no_mangle]
pub fn add_twenty_seven(n: i32) -> i32 {
n + 27
}
Then run this docker image, compiling rust into wasm.
docker run -it --rm -v "$(pwd):/work" opengg/rust-wasm add.rs
Alternatively, you can run an interactive shell, exploring this docker image freely.
docker run -it --rm -v "$(pwd):/work" --entrypoint bash opengg/rust-wasm
Content type
Image
Digest
Size
509.5 MB
Last updated
almost 9 years ago
docker pull opengg/rust-wasm