From 0e937daaa174d93acec77329d2730f288788d405 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Thu, 29 Aug 2024 01:52:53 +0200 Subject: [PATCH] Finish the running examples section of the readme (#2889) --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ee76cc19..adca7ee27 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,25 @@ Dioxus has grown from a side project to a small team of fulltime engineers. Than ## Running the examples -The examples in the top level of this repository can be run with `cargo run --example `. However, we encourage you to download the dioxus-cli and run the examples with `dx serve` since many examples also support web. When running for web, you either need to modify the Cargo.toml to disable the default desktop feature, or use +> The examples in the main branch of this repository target the git version of dioxus and the CLI. If you are looking for examples that work with the latest stable release of dioxus, check out the [0.5 branch](https://github.com/DioxusLabs/dioxus/tree/v0.5/examples). + +The examples in the top level of this repository can be run with: + +```sh +cargo run --example +``` + +However, we encourage you to download the dioxus-cli. If you are running the git version of dioxus, you can install the matching version of the CLI with: + +```sh +cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli --locked +``` + +With the CLI, you can also run examples with the web platform. You just need to disable the default desktop feature and enable the web feature with this command: + +```sh +dx serve --example --platform web -- --no-default-features +``` ## Dioxus vs other frameworks