diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 718922a57..6ff2b1e9c 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -1,6 +1,17 @@
name: macOS tests
on:
+ push:
+ branches:
+ - master
+ paths:
+ - packages/**
+ - examples/**
+ - src/**
+ - .github/**
+ - lib.rs
+ - Cargo.toml
+
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 49ed00901..27116f17d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,6 +1,17 @@
name: Rust CI
on:
+ push:
+ branches:
+ - master
+ paths:
+ - packages/**
+ - examples/**
+ - src/**
+ - .github/**
+ - lib.rs
+ - Cargo.toml
+
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 75953807a..961adee97 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -1,6 +1,17 @@
name: windows
on:
+ push:
+ branches:
+ - master
+ paths:
+ - packages/**
+ - examples/**
+ - src/**
+ - .github/**
+ - lib.rs
+ - Cargo.toml
+
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
diff --git a/Cargo.toml b/Cargo.toml
index d4e41af61..26ced24cb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,8 +16,8 @@ dioxus-core = { path = "./packages/core", version = "^0.1.9" }
dioxus-html = { path = "./packages/html", version = "^0.1.6", optional = true }
dioxus-core-macro = { path = "./packages/core-macro", version = "^0.1.7", optional = true }
dioxus-hooks = { path = "./packages/hooks", version = "^0.1.7", optional = true }
-dioxus-rsx = { path = "./packages/rsx", optional = true }
fermi = { path = "./packages/fermi", version = "^0.1.0", optional = true }
+# dioxus-rsx = { path = "./packages/rsx", optional = true }
dioxus-web = { path = "./packages/web", version = "^0.0.5", optional = true }
dioxus-desktop = { path = "./packages/desktop", version = "^0.1.6", optional = true }
@@ -31,12 +31,14 @@ dioxus-interpreter-js = { path = "./packages/interpreter", version = "^0.0.0", o
[features]
default = ["macro", "hooks", "html"]
-macro = ["dioxus-core-macro", "dioxus-rsx"]
+macro = ["dioxus-core-macro"]
+# macro = ["dioxus-core-macro", "dioxus-rsx"]
hooks = ["dioxus-hooks"]
html = ["dioxus-html"]
ssr = ["dioxus-ssr"]
web = ["dioxus-web"]
desktop = ["dioxus-desktop"]
+ayatana = ["dioxus-desktop/ayatana"]
router = ["dioxus-router"]
[workspace]
diff --git a/README.md b/README.md
index 23cd9c516..4ff7c0bed 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,5 @@
Dioxus
-
- Frontend that scales.
-
@@ -160,9 +157,9 @@ You shouldn't use Dioxus if:
## Comparison with other Rust UI frameworks
Dioxus primarily emphasizes **developer experience** and **familiarity with React principles**.
-- [Yew](https://github.com/yewstack/yew): prefers the elm pattern instead of React-hooks, no borrowed props, supports SSR (no hydration).
+- [Yew](https://github.com/yewstack/yew): prefers the elm pattern instead, no borrowed props, supports SSR (no hydration), no direct desktop/mobile support.
- [Percy](https://github.com/chinedufn/percy): Supports SSR but with less emphasis on state management and event handling.
-- [Sycamore](https://github.com/sycamore-rs/sycamore): VDOM-less using fine-grained reactivity, but lacking in ergonomics.
+- [Sycamore](https://github.com/sycamore-rs/sycamore): VDOM-less using fine-grained reactivity, but no direct support for desktop/mobile.
- [Dominator](https://github.com/Pauan/rust-dominator): Signal-based zero-cost alternative, less emphasis on community and docs.
- [Azul](https://azul.rs): Fully native HTML/CSS renderer for desktop applications, no support for web/ssr
diff --git a/docs/guide/src/hello_world.md b/docs/guide/src/hello_world.md
index e1d4777d9..6bcc77e30 100644
--- a/docs/guide/src/hello_world.md
+++ b/docs/guide/src/hello_world.md
@@ -63,7 +63,7 @@ $ cat Cargo.toml
[package]
name = "hello-dioxus"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -81,6 +81,13 @@ $ cargo add dioxus --features desktop
It's very important to add `dioxus` with the `desktop` feature for this example. The `dioxus` crate is a batteries-include crate that combines a bunch of utility crates together, ensuring compatibility of the most important parts of the ecosystem. Under the hood, the `dioxus` crate configures various renderers, hooks, debug tooling, and more. The `desktop` feature ensures the we only depend on the smallest set of required crates to compile and render.
+If you 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
+```
+
If you plan to develop extensions for the `Dioxus` ecosystem, please use the `dioxus` crate with the `core` feature to limit the amount of dependencies your project brings in.
### Our first app
@@ -92,10 +99,10 @@ use dioxus::prelude::*;
fn main() {
- dioxus::desktop::launch(App);
+ dioxus::desktop::launch(app);
}
-fn App(cx: Scope) -> Element {
+fn app(cx: Scope) -> Element {
cx.render(rsx! (
div { "Hello, world!" }
))
@@ -118,14 +125,14 @@ This initialization code launches a Tokio runtime on a helper thread where your
```rust
fn main() {
- dioxus::desktop::launch(App);
+ dioxus::desktop::launch(app);
}
```
Finally, our app. Every component in Dioxus is a function that takes in `Context` and `Props` and returns an `Element`.
```rust
-fn App(cx: Scope) -> Element {
+fn app(cx: Scope) -> Element {
cx.render(rsx! {
div { "Hello, world!" }
})
@@ -143,5 +150,3 @@ For now, just know that `Scope` lets you store state with hooks and render eleme
## Moving on
Congrats! You've built your first desktop application with Dioxus. Next, we're going to learn about the basics of building interactive user interfaces.
-
-
diff --git a/docs/guide/src/setup.md b/docs/guide/src/setup.md
index 75cfc6606..1bbcec213 100644
--- a/docs/guide/src/setup.md
+++ b/docs/guide/src/setup.md
@@ -52,6 +52,12 @@ Webview Linux apps require WebkitGtk. When distributing, this can be part of you
sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev
```
+When using Debian/bullseye `libappindicator3-dev` is no longer available but replaced by `libayatana-appindicator3-dev`.
+
+```
+# on Debian/bullseye use:
+sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libayatanta-appindicator3-dev
+```
If you run into issues, make sure you have all the basics installed, as outlined in the [Tauri docs](https://tauri.studio/en/docs/get-started/setup-linux).
diff --git a/examples/login_form.rs b/examples/login_form.rs
index 7fd91262d..0a0c77e87 100644
--- a/examples/login_form.rs
+++ b/examples/login_form.rs
@@ -12,7 +12,7 @@ fn app(cx: Scope) -> Element {
let onsubmit = move |evt: FormEvent| {
cx.spawn(async move {
let resp = reqwest::Client::new()
- .post("http://localhost/login")
+ .post("http://localhost:8080/login")
.form(&[
("username", &evt.values["username"]),
("password", &evt.values["password"]),
@@ -22,10 +22,12 @@ fn app(cx: Scope) -> Element {
match resp {
// Parse data from here, such as storing a response token
- Ok(_data) => println!("Login successful"),
+ Ok(_data) => println!("Login successful!"),
//Handle any errors from the fetch here
- Err(_err) => println!("Login failed"),
+ Err(_err) => {
+ println!("Login failed - you need a login server running on localhost:8080.")
+ }
}
});
};
@@ -36,10 +38,10 @@ fn app(cx: Scope) -> Element {
onsubmit: onsubmit,
prevent_default: "onsubmit", // Prevent the default behavior of