Post-publish push

master
DavidOConnor 6 years ago
parent 277693443e
commit 1b56aa1e7c

@ -1,17 +1,17 @@
# Seed Quickstart # Seed Quickstart
To get started with, clone this repo, and make the following changes: To get started, clone this repo, and make the following changes:
- Rename your crate in `Cargo.toml` (The `name` field under `[Package]`) - Rename your crate in `Cargo.toml` (The `name` field under `[Package]`)
- Replace both occurances of `appname` (`/appname.js` and `/appname.wasm`) in `index.html` with your - Replace both occurances of `appname` (`/appname.js` and `/appname.wasm`) in `index.html` with your
crate's name crate's name.
- Make the same replacement in either `build.sh`, or `build.ps1`, depending on your - Make the same replacement in either `build.sh`, or `build.ps1`, depending on your
operating system (`.sh` for Linux, `.ps` for Windows). You may delete the other one. operating system (`.sh` for Linux, `.ps1` for Windows). You may delete the other one.
- If you don't have Rust installed, nightly set up, and wasm-bindgen, [Download it](https://www.rust-lang.org/en-US/), and run the following commands: - If you don't have Rust installed, nightly set up, and wasm-bindgen, [Download it](https://www.rust-lang.org), and run the following commands:
`rustup update` `rustup update`
@ -21,4 +21,5 @@ operating system (`.sh` for Linux, `.ps` for Windows). You may delete the other
`cargo +nightly install wasm-bindgen-cli` `cargo +nightly install wasm-bindgen-cli`
- Run `build.sh` or `build.ps1`, then open `index.html` in a web browser. - Run `build.sh` or `build.ps1`, then open `index.html` in a web browser, or use a local server.
(Opening the file directly may not work in some browsers.)

@ -14,7 +14,7 @@
</head> </head>
<body> <body>
<div id="main"></div> <section id="main"></section>
<script> <script>
// The `--no-modules`-generated JS from `wasm-bindgen` attempts to use // The `--no-modules`-generated JS from `wasm-bindgen` attempts to use

@ -27,7 +27,7 @@ enum Msg {
Increment, Increment,
} }
fn update(msg: &Msg, model: &Model) -> Model { fn update(msg: Msg, model: &Model) -> Model {
match msg { match msg {
Msg::Increment => Model {val: model.val + 1} Msg::Increment => Model {val: model.val + 1}
} }
@ -36,7 +36,7 @@ fn update(msg: &Msg, model: &Model) -> Model {
// View // View
fn view(model: &Model) -> El<Msg> { fn view(model: Model) -> El<Msg> {
button![ button![
vec![simple_ev("click", Msg::Increment)], vec![simple_ev("click", Msg::Increment)],
format!("Hello, World × {}", model.val) format!("Hello, World × {}", model.val)

@ -0,0 +1 @@
Dec 11 19:15:53.330 ERRO Compiling your crate to WebAssembly
Loading…
Cancel
Save