From 2171e9c196671a5aa10bffda1413eb9da566a1cf Mon Sep 17 00:00:00 2001 From: arctic_hen7 Date: Tue, 16 Nov 2021 20:06:07 +1100 Subject: [PATCH] docs(book): fixed dependency versions in docs Also added instruction for installing the Wasm target. Closes #79. --- docs/0.3.x/en-US/hello-world.md | 4 +++- examples/basic/Cargo.toml.example | 2 +- examples/tiny/Cargo.toml.example | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/0.3.x/en-US/hello-world.md b/docs/0.3.x/en-US/hello-world.md index c6a1c53bdf..c49551e5a3 100644 --- a/docs/0.3.x/en-US/hello-world.md +++ b/docs/0.3.x/en-US/hello-world.md @@ -61,7 +61,9 @@ Finally, we tell Perseus what to do if something in your app fails, like if the -Now install the Perseus CLI with `cargo install perseus-cli` (you'll need `wasm-pack` to let Perseus build your app, use `cargo install wasm-pack` to install it) to make your life way easier, and deploy your app to by running `perseus serve` inside the root of your project! This will take a while the first time, because it's got to fetch all your dependencies and build your app. +Now, tell Rust that you want to be compiling for WebAssembly by adding that platform as a target. You can do this by running `rustup target add wasm32-unknown-unknown`. + +After that's finished, you can install the Perseus CLI with `cargo install perseus-cli --version 0.3.0-beta.17` (you'll need `wasm-pack` to let Perseus build your app, use `cargo install wasm-pack` to install it) to make your life way easier, and deploy your app to by running `perseus serve` inside the root of your project! This will take a while the first time, because it's got to fetch all your dependencies and build your app.
Why do I need a CLI? diff --git a/examples/basic/Cargo.toml.example b/examples/basic/Cargo.toml.example index 96864927af..aeb9c9daa8 100644 --- a/examples/basic/Cargo.toml.example +++ b/examples/basic/Cargo.toml.example @@ -6,7 +6,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -perseus = "0.2" +perseus = "0.3.0-beta.17" sycamore = "0.6" serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/examples/tiny/Cargo.toml.example b/examples/tiny/Cargo.toml.example index 32a557aa5f..e677792813 100644 --- a/examples/tiny/Cargo.toml.example +++ b/examples/tiny/Cargo.toml.example @@ -6,5 +6,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -perseus = "0.2" +perseus = "0.3.0-beta.17" sycamore = "0.6"