[package]
name = "dioxus"
version = { workspace = true }
authors = ["Jonathan Kelley", "Dioxus Labs", "ealmloff"]
edition = "2021"
description = "Build fullstack web, desktop, and mobile apps with a single codebase."
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
homepage = "https://dioxuslabs.com"
keywords = ["web", "desktop", "mobile", "gui", "wasm"]
rust-version = "1.80.0"

[dependencies]
dioxus-core = { workspace = true }
dioxus-config-macros = { workspace = true }
dioxus-html = { workspace = true, default-features = false, optional = true }
dioxus-document = { workspace = true, optional = true }
dioxus-history = { workspace = true, optional = true }
dioxus-core-macro = { workspace = true, optional = true }
dioxus-config-macro = { workspace = true, optional = true }
dioxus-hooks = { workspace = true, optional = true }
dioxus-signals = { workspace = true, optional = true }
dioxus-router = { workspace = true, optional = true }
dioxus-web = { workspace = true, default-features = false, optional = true }
dioxus-mobile = { workspace = true, optional = true }
dioxus-desktop = { workspace = true, default-features = true, optional = true }
dioxus-fullstack = { workspace = true, default-features = true, optional = true }
dioxus-liveview = { workspace = true, optional = true }
dioxus-server = { workspace = true, optional = true }
dioxus-ssr = { workspace = true, optional = true }
dioxus-native = { workspace = true, optional = true }
dioxus_server_macro = { workspace = true, optional = true }
manganis = { workspace = true, features = ["dioxus"], optional = true }
dioxus-logger = { workspace = true, optional = true }
warnings = { workspace = true, optional = true }
wasm-splitter = { workspace = true, package = "wasm-split", optional = true }
subsecond = { workspace = true }

serde = { workspace = true, optional = true }
dioxus-cli-config = { workspace = true, optional = true }
dioxus-devtools = { workspace = true, optional = true }

[features]
default = [
  "macro",
  "html",
  "signals",
  "hooks",
  "launch",
  "mounted",
  "file_engine",
  "document",
  "asset",
  "devtools",
  "logger",
  "warnings",
  "cli-config",
]
minimal = ["macro", "html", "signals", "hooks", "launch"]
signals = ["dep:dioxus-signals"]
macro = ["dep:dioxus-core-macro"]
html = ["dep:dioxus-html"]
hooks = ["dep:dioxus-hooks"]
devtools = ["dep:dioxus-devtools", "dioxus-web?/devtools", "dioxus-fullstack?/devtools"]
mounted = ["dioxus-web?/mounted"]
file_engine = ["dioxus-web?/file_engine"]
asset = ["dep:manganis"]
document = ["dioxus-web?/document", "dep:dioxus-document", "dep:dioxus-history"]
logger = ["dep:dioxus-logger"]
cli-config = ["dep:dioxus-cli-config"]
warnings = ["dep:warnings"]
wasm-split = [
  "dep:wasm-splitter",
  "dioxus-config-macros/wasm-split",
] # note: to turn on the router splitter, you need to manually enable wasm-split on the router

launch = ["dep:dioxus-config-macro"]
router = ["dep:dioxus-router"]

# Platforms
fullstack = ["dep:dioxus-fullstack", "dioxus-config-macro/fullstack", "dep:serde"]
desktop = ["dep:dioxus-desktop", "dioxus-fullstack?/desktop", "dioxus-config-macro/desktop"]
mobile = ["dep:dioxus-mobile", "dep:dioxus-desktop", "dioxus-fullstack?/mobile", "dioxus-config-macro/mobile"]
web = [
  "dep:dioxus-web",
  "dioxus-fullstack?/web",
  "dioxus-config-macro/web",
  "dep:dioxus-cli-config",
  "dioxus-cli-config?/web",
]
ssr = ["dep:dioxus-ssr", "dioxus-config-macro/ssr"]
liveview = ["dep:dioxus-liveview", "dioxus-config-macro/liveview"]
native = ["dep:dioxus-native"] # todo(jon): decompose the desktop crate such that "webview" is the default and native is opt-in
server = [
  "dep:dioxus-server",
  "dep:dioxus_server_macro",
  "dioxus_server_macro/server",
  "dioxus_server_macro/axum",
  "ssr",
  "dioxus-liveview?/axum",
  "dioxus-fullstack?/server",
]

# This feature just disables the no-renderer-enabled warning
third-party-renderer = []

[dev-dependencies]
futures-util = { workspace = true }
tracing = { workspace = true }
rand = { workspace = true, features = ["small_rng"] }
criterion = { workspace = true }
thiserror = { workspace = true }
env_logger = { workspace = true }
tokio = { workspace = true, features = ["full"] }
dioxus = { workspace = true }

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

[package.metadata.docs.rs]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
features = ["router", "ssr", "web", "fullstack", "signals", "hooks", "html", "liveview", "server", "warnings"]
