From 2620d643edb7a0251a4bc68058ec948fc1e6c4ce Mon Sep 17 00:00:00 2001 From: Joe Clay <27cupsofcoffee@gmail.com> Date: Thu, 14 May 2020 12:51:25 +0100 Subject: [PATCH 1/3] Simplify the example a bit --- examples/hello/README.md | 4 ++-- examples/hello/index.html | 8 ++++---- examples/hello/src/main.rs | 9 +-------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/examples/hello/README.md b/examples/hello/README.md index 5e0b889..ed86728 100644 --- a/examples/hello/README.md +++ b/examples/hello/README.md @@ -21,9 +21,9 @@ cargo run --features=window-sdl2 To run with web-sys: ```shell -cargo +nightly build --target wasm32-unknown-unknown +cargo build --target wasm32-unknown-unknown mkdir -p generated -wasm-bindgen ../../target/wasm32-unknown-unknown/debug/hello.wasm --out-dir generated --no-modules +wasm-bindgen ../../target/wasm32-unknown-unknown/debug/hello.wasm --out-dir generated --target web cp index.html generated ``` diff --git a/examples/hello/index.html b/examples/hello/index.html index 4e1f773..b8671f0 100644 --- a/examples/hello/index.html +++ b/examples/hello/index.html @@ -5,10 +5,10 @@ - diff --git a/examples/hello/src/main.rs b/examples/hello/src/main.rs index 8a34e8f..160c5af 100644 --- a/examples/hello/src/main.rs +++ b/examples/hello/src/main.rs @@ -1,22 +1,15 @@ use glow::*; -#[cfg(all(target_arch = "wasm32", feature = "web-sys"))] -use wasm_bindgen::prelude::*; - #[cfg(all(target_arch = "wasm32", feature = "stdweb"))] use std_web::{ traits::*, unstable::TryInto, web::{document, html_element::*}, }; + #[cfg(all(target_arch = "wasm32", feature = "stdweb"))] use webgl_stdweb::WebGL2RenderingContext; -#[cfg_attr(all(target_arch = "wasm32", feature = "web-sys"), wasm_bindgen(start))] -pub fn wasm_main() { - main(); -} - fn main() { unsafe { // Create a context from a WebGL2 context on wasm32 targets From 77e374b6999d76f694948f6316dc856a8660a47f Mon Sep 17 00:00:00 2001 From: Joe Clay <27cupsofcoffee@gmail.com> Date: Thu, 14 May 2020 13:42:28 +0100 Subject: [PATCH 2/3] Bump minimum Rust version --- .travis.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0e42ba6..95f4e64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: rust rust: - - 1.37.0 + - 1.38.0 - stable - beta - nightly diff --git a/README.md b/README.md index d024e44..3e03cf2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@
- Minimum Rust Version + Minimum Rust Version crates.io docs.rs Travis Build Status From 4c8a3c604aeaa025b185e7047e8546cce9b7cfb9 Mon Sep 17 00:00:00 2001 From: Joe Clay <27cupsofcoffee@gmail.com> Date: Thu, 14 May 2020 14:36:25 +0100 Subject: [PATCH 3/3] Bump minimum Rust version (again) --- .travis.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 95f4e64..b4eade9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: rust rust: - - 1.38.0 + - 1.40.0 - stable - beta - nightly diff --git a/README.md b/README.md index 3e03cf2..7d1c210 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

- Minimum Rust Version + Minimum Rust Version crates.io docs.rs Travis Build Status