From 8705283bb0dc5fa398069c8533342d16f78256f0 Mon Sep 17 00:00:00 2001 From: DavidOConnor Date: Sun, 20 Jan 2019 10:39:03 -0500 Subject: [PATCH] Changes in readme to reflect improved build script --- Cargo.toml | 7 +++---- README.md | 8 +++----- build.ps1 | 2 +- build.sh | 2 +- index.html | 4 ++-- src/lib.rs | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2373885..2d062c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,10 +10,9 @@ crate-type = ["cdylib"] [dependencies] -seed = "^0.2.1" -wasm-bindgen = "^0.2.29" +seed = "^0.2.3" +wasm-bindgen = "^0.2.33" web-sys = "^0.3.6" # For serialization, eg sending requests to a server. Otherwise, not required. -serde = { version = "^1.0.80", features = ['derive'] } -serde_json = "^1.0.33" \ No newline at end of file +serde = { version = "^1.0.85", features = ['derive'] } diff --git a/README.md b/README.md index 1370229..c1c8969 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,8 @@ If you run into permission errors on `build.sh`, try this command to allow executing the file:`chmod +x build.sh`. If you run into persmission errors on `build.ps1`, open Powershell as an administrator, and enter this command: `Set-ExecutionPolicy RemoteSigned`. Once you rename the crate in `Cargo.toml` (The `name` field under `[Package]`), make the -following changes: +following change: -- Replace both occurances of `appname` (`/appname.js` and `/appname.wasm`) in `index.html` with your crate's name. - -- Make the same replacement in either `build.sh`, or `build.ps1`, depending on your -operating system. You may delete the other one. +- Replace `appname` with your new name in either `build.sh`, or `build.ps1`, depending on your +operating system. diff --git a/build.ps1 b/build.ps1 index aec6011..82d62be 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,2 +1,2 @@ cargo build --target wasm32-unknown-unknown -wasm-bindgen target/wasm32-unknown-unknown/debug/appname.wasm --no-modules --out-dir ./pkg \ No newline at end of file +wasm-bindgen target/wasm32-unknown-unknown/debug/appname.wasm --no-modules --out-dir ./pkg --out-name package \ No newline at end of file diff --git a/build.sh b/build.sh index 57cc1b7..381a4af 100644 --- a/build.sh +++ b/build.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash cargo build --target wasm32-unknown-unknown -wasm-bindgen target/wasm32-unknown-unknown/debug/appname.wasm --no-modules --out-dir ./pkg \ No newline at end of file +wasm-bindgen target/wasm32-unknown-unknown/debug/appname.wasm --no-modules --out-dir ./pkg --out-name package \ No newline at end of file diff --git a/index.html b/index.html index 8745134..8cb6f2f 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@
- + diff --git a/src/lib.rs b/src/lib.rs index 10147c7..4adf64d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -35,7 +35,7 @@ fn update(msg: Msg, model: Model) -> Model { // View -fn view(state: seed::App, model: Model) -> El { +fn view(_state: seed::App, model: Model) -> El { button![ simple_ev("click", Msg::Increment), format!("Hello, World × {}", model.val)