Make router configed-by-platform

This commit is contained in:
Jonathan Kelley committed 2024-01-18 12:41:19 -08:00
1 parent b8adfb9293
commit 84e82fc3e2
5 files changed
+6 -13

No files matched your search

Generated
-1
View File
@@ -2502,7 +2502,6 @@ dependencies = [
"separator",
"serde",
"serde_json",
"simple_logger",
"thiserror",
"tokio",
"tracing-subscriber",
-1
View File
@@ -145,7 +145,6 @@ rand = { version = "0.8.4", features = ["small_rng"] }
tokio = { version = "1.16.1", features = ["full"] }
reqwest = { version = "0.11.9", features = ["json"] }
env_logger = "0.10.0"
simple_logger = "4.0.0"
thiserror = { workspace = true }
tracing-subscriber = "0.3.17"
http-range = "0.1.5"
-5
View File
@@ -4,11 +4,6 @@ use dioxus::prelude::*;
use dioxus_router::prelude::*;
fn main() {
simple_logger::SimpleLogger::new()
.with_level(log::LevelFilter::Debug)
.with_module_level("dioxus", log::LevelFilter::Trace)
.init()
.unwrap();
launch_desktop(|| {
rsx! {
Router::<Route> {}
+4 -4
View File
@@ -43,12 +43,12 @@ launch = ["dioxus-config-macro"]
router = ["dioxus-router"]
# Platforms
fullstack = ["dioxus-fullstack", "dioxus-config-macro/fullstack", "serde"]
fullstack = ["dioxus-fullstack", "dioxus-config-macro/fullstack", "serde", "dioxus-router?/fullstack"]
desktop = ["dioxus-desktop", "dioxus-fullstack?/desktop", "dioxus-config-macro/desktop"]
mobile = ["dioxus-mobile", "dioxus-fullstack?/desktop", "dioxus-config-macro/desktop"] # todo: use the mobile versions of these
web = ["dioxus-web", "dioxus-fullstack?/web", "dioxus-config-macro/web"]
ssr = ["dioxus-fullstack?/ssr", "dioxus-config-macro/ssr"]
liveview = ["dioxus-desktop", "dioxus-config-macro/liveview"]
web = ["dioxus-web", "dioxus-fullstack?/web", "dioxus-config-macro/web", "dioxus-router?/web"]
ssr = ["dioxus-fullstack?/ssr", "dioxus-config-macro/ssr", "dioxus-router?/ssr"]
liveview = ["dioxus-liveview", "dioxus-config-macro/liveview", "dioxus-router?/liveview"]
axum = ["dioxus-fullstack?/axum"]
salvo = ["dioxus-fullstack?/salvo"]
warp = ["dioxus-fullstack?/warp"]
+2 -2
View File
@@ -28,10 +28,10 @@ dioxus-liveview = { workspace = true, optional = true }
dioxus-ssr = { workspace = true, optional = true }
dioxus-fullstack = { workspace = true, optional = true }
tokio = { workspace = true, features = ["full"], optional = true }
dioxus-cli-config.workspace = true
dioxus-cli-config = { workspace = true }
[features]
default = ["web"]
default = []
ssr = ["dioxus-ssr", "tokio"]
liveview = ["dioxus-liveview", "tokio", "dep:serde", "serde_json"]
wasm_test = []