Skip to content

Renderers are now packages, not features. #387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
args: --features "desktop, ssr, router"
args: --all --tests
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: check
args: --all --examples --tests

test:
if: github.event.pull_request.draft == false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ jobs:
rustc -Vv
cargo -V
set RUST_BACKTRACE=1
cargo build --features "desktop, ssr, router"
cargo test --features "desktop, ssr, router"
cargo build --all --tests --examples
cargo test --all --tests
shell: cmd
93 changes: 24 additions & 69 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,61 +1,10 @@
[package]
name = "dioxus"
version = "0.2.4"
authors = ["Jonathan Kelley"]
edition = "2021"
description = "Core functionality for Dioxus - a concurrent renderer-agnostic Virtual DOM for interactive user experiences"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
homepage = "https://dioxuslabs.com"
documentation = "https://dioxuslabs.com"
keywords = ["dom", "ui", "gui", "react", "wasm"]
rust-version = "1.60.0"

[dependencies]
dioxus-core = { path = "./packages/core", version = "^0.2.1" }
dioxus-html = { path = "./packages/html", version = "^0.2.1", optional = true }
dioxus-core-macro = { path = "./packages/core-macro", version = "^0.2.1", optional = true }
dioxus-hooks = { path = "./packages/hooks", version = "^0.2.1", optional = true }
fermi = { path = "./packages/fermi", version = "^0.2.1", optional = true }

dioxus-web = { path = "./packages/web", version = "^0.2.1", optional = true }
dioxus-desktop = { path = "./packages/desktop", version = "^0.2.3", optional = true }
dioxus-ssr = { path = "./packages/ssr", version = "^0.2.1", optional = true }

dioxus-router = { path = "./packages/router", version = "^0.2.3", optional = true }
dioxus-interpreter-js = { path = "./packages/interpreter", version = "^0.2.1", optional = true }
dioxus-tui = { path = "./packages/tui", version = "^0.2.2", optional = true }

dioxus-rsx = { path = "./packages/rsx", optional = true }
dioxus-rsx-interpreter = { path = "./packages/rsx_interpreter", optional = true }
dioxus-liveview = { path = "./packages/liveview", version = "^0.1.0", optional = true }

dioxus-native-core = { path = "./packages/native-core", version = "^0.2.0", optional = true }
dioxus-native-core-macro = { path = "./packages/native-core-macro", version = "^0.2.0", optional = true }

# dioxus-mobile = { path = "./packages/mobile", version = "^0.2.0", optional = true }
# dioxus-rsx = { path = "./packages/rsx", optional = true }
# macro = ["dioxus-core-macro", "dioxus-rsx"]

[features]
default = ["macro", "hooks", "html"]

macro = ["dioxus-core-macro", "dioxus-rsx"]
hooks = ["dioxus-hooks"]
html = ["dioxus-html"]
ssr = ["dioxus-ssr"]
web = ["dioxus-web", "dioxus-router?/web"]
desktop = ["dioxus-desktop"]
router = ["dioxus-router"]
tui = ["dioxus-tui"]
liveview = ["dioxus-liveview"]
hot-reload = ["dioxus-core-macro/hot-reload", "dioxus-rsx-interpreter", "dioxus-desktop?/hot-reload", "dioxus-web?/hot-reload", "dioxus-router?/hot-reload"]
native-core = ["dioxus-native-core", "dioxus-native-core-macro"]

[workspace]
members = [
"packages/dioxus",
"packages/core",
"packages/core-macro",
"packages/router",
"packages/html",
"packages/hooks",
"packages/web",
Expand All @@ -71,11 +20,32 @@ members = [
"packages/rsx_interpreter",
"packages/native-core",
"packages/native-core-macro",
"packages/rsx-prelude",
"docs/guide",
]


# This is a "virtual package"
# It is not meant to be published, but is used so "cargo run --example XYZ" works properly
[package]
name = "dioxus-examples"
version = "0.0.0"
authors = ["Jonathan Kelley"]
edition = "2021"
description = "Top level crate for the Dioxus repository"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
homepage = "https://dioxuslabs.com"
documentation = "https://dioxuslabs.com"
keywords = ["dom", "ui", "gui", "react", "wasm"]
rust-version = "1.60.0"


[dev-dependencies]
dioxus = { path = "./packages/dioxus" }
dioxus-desktop = { path = "./packages/desktop" }
dioxus-ssr = { path = "./packages/ssr" }
dioxus-router = { path = "./packages/router" }
fermi = { path = "./packages/fermi" }
futures-util = "0.3.21"
log = "0.4.14"
num-format = "0.4.0"
Expand All @@ -87,21 +57,6 @@ serde_json = "1.0.79"
rand = { version = "0.8.4", features = ["small_rng"] }
tokio = { version = "1.16.1", features = ["full"] }
reqwest = { version = "0.11.9", features = ["json"] }
dioxus = { path = ".", features = ["desktop", "ssr", "router", "fermi", "tui", "hot-reload"] }
fern = { version = "0.6.0", features = ["colored"] }
criterion = "0.3.5"
thiserror = "1.0.30"
env_logger = "0.9.0"


[[bench]]
name = "create"
harness = false

[[bench]]
name = "jsframework"
harness = false

[[bench]]
name = "tui_update"
harness = false
13 changes: 11 additions & 2 deletions docs/guide/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ description = "Dioxus guide, including testable examples"
license = "MIT/Apache-2.0"

[dev-dependencies]
dioxus = { path = "../..", features = ["desktop", "web", "ssr", "router", "fermi", "tui"] }
dioxus = { path = "../../packages/dioxus" }
dioxus-desktop = { path = "../../packages/desktop" }
dioxus-web = { path = "../../packages/web" }
dioxus-ssr = { path = "../../packages/ssr" }
dioxus-router = { path = "../../packages/router" }
dioxus-tui = { path = "../../packages/tui" }
fermi = { path = "../../packages/fermi" }


# dioxus = { path = "../../packages/dioxus", features = ["desktop", "web", "ssr", "router", "fermi", "tui"] }
serde = { version = "1.0.138", features=["derive"] }
reqwest = { version = "0.11.11", features = ["json"] }
tokio = { version = "1.19.2" , features=[]}
tokio = { version = "1.19.2" , features=[]}
2 changes: 1 addition & 1 deletion docs/guide/examples/boolean_attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/component_borrowed_props.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

// ANCHOR: App
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/component_children.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/component_children_inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/component_element_props.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/component_owned_props.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

// ANCHOR: App
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/component_props_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

// ANCHOR: App
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/conditional_rendering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

pub fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/dangerous_inner_html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/event_click.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/event_handler_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use dioxus::events::MouseEvent;
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/event_nested.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/event_prevent_default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/hello_world_desktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

// ANCHOR: component
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/hello_world_tui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::tui::launch(App);
dioxus_tui::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
8 changes: 4 additions & 4 deletions docs/guide/examples/hello_world_tui_no_ctrl_c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

use dioxus::events::{KeyCode, KeyboardEvent};
use dioxus::prelude::*;
use dioxus::tui::TuiContext;
use dioxus_tui::TuiContext;

fn main() {
dioxus::tui::launch_cfg(
dioxus_tui::launch_cfg(
App,
dioxus::tui::Config::new()
dioxus_tui::Config::new()
.without_ctrl_c_quit()
// Some older terminals only support 16 colors or ANSI colors
// If your terminal is one of these, change this to BaseColors or ANSI
.with_rendering_mode(dioxus::tui::RenderingMode::Rgb),
.with_rendering_mode(dioxus_tui::RenderingMode::Rgb),
);
}

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/hello_world_web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::web::launch(App);
dioxus_web::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/hooks_bad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use dioxus::prelude::*;
use std::collections::HashMap;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

fn App(cx: Scope) -> Element {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/hooks_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

// ANCHOR: component
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/hooks_counter_two_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

// ANCHOR: component
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/hooks_use_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

// ANCHOR: component
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/input_controlled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

// ANCHOR: component
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/input_uncontrolled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(App);
dioxus_desktop::launch(App);
}

// ANCHOR: component
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/examples/meme_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use dioxus::events::FormEvent;
use dioxus::prelude::*;

fn main() {
dioxus::desktop::launch(MemeEditor);
dioxus_desktop::launch(MemeEditor);
}

// ANCHOR: meme_editor
Expand Down
Loading