[package]
name = "egui_demo_app"
version = "0.19.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.61"
publish = false
default-run = "egui_demo_app"

[package.metadata.docs.rs]
all-features = true

[lib]
crate-type = ["cdylib", "rlib"]


[features]
default = ["glow", "persistence"]

http = ["ehttp", "image", "poll-promise", "egui_extras/image"]
persistence = [
    "eframe/persistence",
    "egui/persistence",
    "serde",
]
screen_reader = ["eframe/screen_reader"] # experimental
serde = [
    "dep:serde",
    "egui_demo_lib/serde",
    "egui_extras/serde",
    "egui/serde",
]
syntax_highlighting = ["egui_demo_lib/syntax_highlighting"]

glow = ["eframe/glow"]
wgpu = ["eframe/wgpu", "bytemuck"]


[dependencies]
chrono = { version = "0.4", features = ["js-sys", "wasmbind"] }
eframe = { version = "0.19.0", path = "../eframe", default-features = false }
egui = { version = "0.19.0", path = "../egui", features = ["extra_debug_asserts"] }
egui_demo_lib = { version = "0.19.0", path = "../egui_demo_lib", features = ["chrono"] }
tracing = "0.1"

# Optional dependencies:

bytemuck = { version = "1.7.1", optional = true }
egui_extras = { version = "0.19.0", optional = true, path = "../egui_extras" }

# feature "http":
ehttp = { version = "0.2.0", optional = true }
image = { version = "0.24", optional = true, default-features = false, features = [
  "jpeg",
  "png",
] }
poll-promise = { version = "0.1", optional = true, default-features = false }

# feature "persistence":
serde = { version = "1", optional = true, features = ["derive"] }


# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tracing-subscriber = "0.3"

# web:
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
tracing-wasm = "0.2"
