remove references to renderer features
This commit is contained in:
1 parent
a42660a451
commit
c74a16b8d4
16 files changed
+39
-69
No files matched your search
@@ -25,19 +25,13 @@ cargo new --bin demo
|
||||
cd demo
|
||||
```
|
||||
|
||||
Add Dioxus with the `desktop` feature (this will edit `Cargo.toml`):
|
||||
Add Dioxus and the `desktop` renderer (this will edit `Cargo.toml`):
|
||||
|
||||
```shell
|
||||
cargo add dioxus --features desktop
|
||||
cargo add dioxus
|
||||
cargo add dioxus-desktop
|
||||
```
|
||||
|
||||
> If your system does not provide the `libappindicator3` library, like Debian/bullseye, you can enable the replacement `ayatana` with an additional flag:
|
||||
>
|
||||
>```shell
|
||||
># On Debian/bullseye use:
|
||||
>cargo add dioxus --features desktop --features ayatana
|
||||
>```
|
||||
|
||||
Edit your `main.rs`:
|
||||
|
||||
```rust
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Install [dioxus-cli](https://github.com/DioxusLabs/cli).
|
||||
Enable the hot-reload feature on dioxus:
|
||||
```toml
|
||||
dioxus = { version = "*", features = ["web", "hot-reload"] }
|
||||
dioxus = { version = "*", features = ["hot-reload"] }
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
@@ -52,7 +52,8 @@ path = "gen/bin/desktop.rs"
|
||||
# clear all the dependencies
|
||||
[dependencies]
|
||||
mobile-entry-point = "0.1.0"
|
||||
dioxus = { version = "*", features = ["mobile"] }
|
||||
dioxus = { version = "*"}
|
||||
dioxus-desktop = { version = "*" }
|
||||
simple_logger = "*"
|
||||
```
|
||||
|
||||
@@ -62,7 +63,7 @@ Edit your `lib.rs`:
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
dioxus_mobile::launch(app);
|
||||
dioxus_desktop::launch(app);
|
||||
}
|
||||
|
||||
fn app(cx: Scope) -> Element {
|
||||
|
||||
@@ -36,10 +36,11 @@ cargo new --bin demo
|
||||
cd app
|
||||
```
|
||||
|
||||
Add Dioxus with the `ssr` feature:
|
||||
Add Dioxus and the `ssr` renderer feature:
|
||||
|
||||
```shell
|
||||
cargo add dioxus --features ssr
|
||||
cargo add dioxus
|
||||
cargo add dioxus-ssr
|
||||
```
|
||||
|
||||
Next, add all the Axum dependencies. This will be different if you're using a different Web Framework
|
||||
@@ -54,7 +55,8 @@ Your dependencies should look roughly like this:
|
||||
```toml
|
||||
[dependencies]
|
||||
axum = "0.4.5"
|
||||
dioxus = { version = "*", features = ["ssr"] }
|
||||
dioxus = { version = "*" }
|
||||
dioxus-ssr = { version = "*" }
|
||||
tokio = { version = "1.15.0", features = ["full"] }
|
||||
```
|
||||
|
||||
|
||||
@@ -13,12 +13,13 @@ TUI support is currently quite experimental. Even the project name will change.
|
||||
## Getting Set up
|
||||
|
||||
|
||||
Start by making a new package and adding our TUI feature.
|
||||
Start by making a new package and adding our TUI renderer.
|
||||
|
||||
```shell
|
||||
cargo new --bin demo
|
||||
cd demo
|
||||
cargo add dioxus --features tui
|
||||
cargo add dioxus
|
||||
cargo add dioxus-tui
|
||||
```
|
||||
|
||||
Then, edit your `main.rs` with the basic template.
|
||||
@@ -42,5 +43,6 @@ Press "ctrl-c" to close the app. To switch from "ctrl-c" to just "q" to quit yo
|
||||
## Notes
|
||||
|
||||
- Our TUI package uses flexbox for layout
|
||||
- Regular widgets will not work in the tui render, but the tui renderer has it's own widget components (see [the widgets example](https://github.com/DioxusLabs/dioxus/blob/master/packages/tui/examples/tui_widgets.rs)).
|
||||
- 1px is one character lineheight. Your regular CSS px does not translate.
|
||||
- If your app panics, your terminal is wrecked. This will be fixed eventually.
|
||||
@@ -38,10 +38,11 @@ cargo new --bin demo
|
||||
cd demo
|
||||
```
|
||||
|
||||
Add Dioxus as a dependency with the `web` feature:
|
||||
Add Dioxus as a dependency and add the web renderer:
|
||||
|
||||
```bash
|
||||
cargo add dioxus --features web
|
||||
cargo add dioxus
|
||||
cargo add dioxus-web
|
||||
```
|
||||
|
||||
Add an `index.html` for Trunk to use. Make sure your "mount point" element has an ID of "main":
|
||||
|
||||
Reference in new issue
Block a user