From 32bbbe1da76d90e17df80144e16ba77eb61dcbd1 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 31 Jan 2017 23:46:13 +1100 Subject: [PATCH] Attempt to get web build less broken Based on an idea from . It didn't make it work... but it doesn't appear to have made it _worse_. So I'm just going to leave this here and then check back in later. --- Cargo.toml | 4 ++++ build_web.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3c20213..b18cf85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,10 @@ authors = ["Jeff Parsons "] [lib] path = "src/lib.rs" +[[bin]] +name = "demo" +path = "src/bin/main.rs" + [dependencies] noise = "0.2.0" piston = "0.25.1" diff --git a/build_web.sh b/build_web.sh index b1b2c57..ce9f52a 100755 --- a/build_web.sh +++ b/build_web.sh @@ -12,5 +12,5 @@ echo tput sgr0 # Run the actual build. -rustup run nightly cargo build --target wasm32-unknown-emscripten "$@" +cargo +nightly rustc --target wasm32-unknown-emscripten --bin demo -- -C link-arg="-s" -C link-arg="BINARYEN_METHOD='interpret-binary'"