@ -9,7 +9,7 @@ edition = "2018"
crate-type = ["cdylib"]
[dependencies]
seed = "^0.1.4"
seed = "^0.1.7"
wasm-bindgen = "^0.2.29"
web-sys = "^0.3.6"
@ -12,8 +12,8 @@
`cargo install wasm-bindgen-cli`
- Run `build.sh` or `build.ps1`, then then start a dev server that supports WASM.
For example, with [Python](https://www.python.org/downloads/) installed, run `python server.py`.
(Linux users may need to run `python3 server.py`.)
For example, with [Python](https://www.python.org/downloads/) installed, run `python pyserve.py`.
(Linux users may need to run `python3 serve.py`.)
Once you rename the crate in `Cargo.toml` (The `name` field under `[Package]`), make the
following changes:
@ -27,7 +27,7 @@ enum Msg {
Increment,
}
fn update(msg: Msg, model: Model) -> Model {
fn update(history: &mut History<Model, Msg>, msg: Msg, model: Model) -> Model {
match msg {
Msg::Increment => Model {val: model.val + 1}
@ -45,5 +45,5 @@ fn view(model: Model) -> El<Msg> {
#[wasm_bindgen]
pub fn render() {
seed::run(Model::default(), update, view, "main");
seed::run(Model::default(), update, view, "main", None);