simplify server package features

This commit is contained in:
Evan Almloff 2023-04-01 17:05:44 -05:00
parent c6992c7032
commit 6a51f8998d
9 changed files with 15 additions and 11 deletions

View file

@ -35,7 +35,7 @@ anymap = "0.12.1"
[features] [features]
default = [] default = []
warp = ["dep:warp", "http-body"] warp = ["dep:warp", "http-body", "ssr"]
axum = ["dep:axum", "tower-http", "hyper"] axum = ["dep:axum", "tower-http", "hyper", "ssr"]
salvo = ["dep:salvo", "hyper"] salvo = ["dep:salvo", "hyper", "ssr"]
ssr = ["server_fn/ssr", "tokio", "dioxus-ssr"] ssr = ["server_fn/ssr", "tokio", "dioxus-ssr"]

View file

@ -15,5 +15,6 @@ tokio = { version = "1.27.0", features = ["full"], optional = true }
serde = "1.0.159" serde = "1.0.159"
[features] [features]
ssr = ["axum", "tokio", "dioxus-server/ssr", "dioxus-server/axum"] default = ["web"]
ssr = ["axum", "tokio", "dioxus-server/axum"]
web = ["dioxus-web", "dioxus-router/web"] web = ["dioxus-web", "dioxus-router/web"]

View file

@ -2,7 +2,7 @@
//! //!
//! ```sh //! ```sh
//! dioxus build --features web //! dioxus build --features web
//! cargo run --features ssr //! cargo run --features ssr --no-default-features
//! ``` //! ```
#![allow(non_snake_case)] #![allow(non_snake_case)]

View file

@ -17,5 +17,6 @@ tower-http = { version = "0.4.0", features = ["fs"], optional = true }
http = { version = "0.2.9", optional = true } http = { version = "0.2.9", optional = true }
[features] [features]
ssr = ["axum", "tokio", "dioxus-server/ssr", "dioxus-server/axum", "tower-http", "http"] default = ["web"]
ssr = ["axum", "tokio", "dioxus-server/axum", "tower-http", "http"]
web = ["dioxus-web", "dioxus-router/web"] web = ["dioxus-web", "dioxus-router/web"]

View file

@ -2,7 +2,7 @@
//! //!
//! ```sh //! ```sh
//! dioxus build --features web //! dioxus build --features web
//! cargo run --features ssr //! cargo run --features ssr --no-default-features
//! ``` //! ```
#![allow(non_snake_case)] #![allow(non_snake_case)]

View file

@ -14,5 +14,6 @@ serde = "1.0.159"
salvo = { version = "0.37.9", optional = true } salvo = { version = "0.37.9", optional = true }
[features] [features]
ssr = ["salvo", "tokio", "dioxus-server/ssr", "dioxus-server/salvo"] default = ["web"]
ssr = ["salvo", "tokio", "dioxus-server/salvo"]
web = ["dioxus-web"] web = ["dioxus-web"]

View file

@ -2,7 +2,7 @@
//! //!
//! ```sh //! ```sh
//! dioxus build --features web //! dioxus build --features web
//! cargo run --features ssr //! cargo run --features ssr --no-default-features
//! ``` //! ```
#![allow(non_snake_case)] #![allow(non_snake_case)]

View file

@ -14,5 +14,6 @@ serde = "1.0.159"
warp = { version = "0.3.3", optional = true } warp = { version = "0.3.3", optional = true }
[features] [features]
ssr = ["warp", "tokio", "dioxus-server/ssr", "dioxus-server/warp"] default = ["web"]
ssr = ["warp", "tokio", "dioxus-server/warp"]
web = ["dioxus-web"] web = ["dioxus-web"]

View file

@ -2,7 +2,7 @@
//! //!
//! ```sh //! ```sh
//! dioxus build --features web //! dioxus build --features web
//! cargo run --features ssr //! cargo run --features ssr --no-default-features
//! ``` //! ```
#![allow(non_snake_case)] #![allow(non_snake_case)]