[package] name = "zng-app" version = "0.13.6" authors = ["The Zng Project Developers"] edition = "2021" license = "Apache-2.0 OR MIT" readme = "README.md" description = "Part of the zng project." documentation = "https://zng-ui.github.io/doc/zng_app" repository = "https://github.com/zng-ui/zng" categories = ["gui"] keywords = ["gui", "ui", "user-interface", "zng"] [features] default = ["ipc", "debug_default"] # Enable the `"dyn_*"` and `"inspector"` features in debug builds. debug_default = ["zng-var/debug_default", "zng-app-context/dyn_closure"] # Use dynamic dispatch at the node level by placing each property node in a `BoxedUiNode` and enabling `UiNode::cfg_boxed`. # # This speeds-up compilation time at the cost of runtime. dyn_node = [] # Instrument each widget instance to retain build information. inspector = [] # Use dynamic dispatch at the app-extension level. # # This speeds-up compilation time at the cost of runtime. dyn_app_extension = [] # Box closures at opportune places, such as `Var::map`, reducing the number of monomorphised types. # # This speeds-up compilation time at the cost of runtime. dyn_closure = ["zng-var/dyn_closure", "zng-app-context/dyn_closure"] # Like `cfg(test)` but also visible in docs and integration tests. test_util = ["multi_app", "deadlock_detection"] # Allows multiple app instances per-process. # # This feature allows multiple apps, one app per thread at a time. The `LocalContext` tracks # what app is currently running in each thread and `app_local!` statics switch to the value of each app # depending on the current thread. # # Not enabled by default, but enabled by `feature="test_util"`. multi_app = ["zng-app-context/multi_app"] # Instrument every widget outer-most node to trace UI methods. trace_widget = [] # Instrument every property and intrinsic node to trace UI methods. # # Note that this can cause very large trace files and bad performance. trace_wgt_item = [] # Allow app-process crash handler. # # Only enables in `not(any(target_arch = "wasm32", target_os = "android", target_os = "ios"))` builds. crash_handler = [ "dep:serde_json", "dep:minidumper", "dep:crash-handler", "dep:minidump", "dep:linkme", "dep:uuid", ] # Enables IPC tasks and pre-build views and connecting to views running in another process. ipc = ["zng-view-api/ipc", "zng-task/ipc"] # Spawns a thread on app creation that checks and prints `parking_lot` deadlocks. # # Not enabled by default, but enabled by `feature="test_util"`. deadlock_detection = ["zng-task/deadlock_detection"] [dependencies] zng-app-proc-macros = { path = "../zng-app-proc-macros", version = "0.3.8" } zng-unique-id = { path = "../zng-unique-id", version = "0.4.7" } zng-env = { path = "../zng-env", version = "0.3.7" } zng-handle = { path = "../zng-handle", version = "0.2.5" } zng-tp-licenses = { path = "../zng-tp-licenses", version = "0.2.8" } zng-clone-move = { path = "../zng-clone-move", version = "0.2.5" } zng-app-context = { path = "../zng-app-context", version = "0.5.12" } zng-time = { path = "../zng-time", version = "0.2.24" } zng-var = { path = "../zng-var", version = "0.5.9" } zng-txt = { path = "../zng-txt", version = "0.2.8" } zng-task = { path = "../zng-task", version = "0.4.10" } zng-view-api = { path = "../zng-view-api", version = "0.10.4", features = [ "var", ] } zng-state-map = { path = "../zng-state-map", version = "0.3.7" } zng-layout = { path = "../zng-layout", version = "0.2.30" } zng-color = { path = "../zng-color", version = "0.3.15" } tracing = "0.1" tracing-subscriber = "0.3" pretty-type-name = "1.0" parking_lot = "0.12" serde = { version = "1.0", features = ["derive"] } bytemuck = { version = "1.15", features = ["derive"] } flume = "0.11" atomic = "0.6" bitflags = { version = "2.5", features = ["serde", "bytemuck"] } paste = "1.0" once_cell = "1.19" unic-langid = { version = "0.9", features = ["serde"] } unicase = "2.7" hashbrown = { version = "0.15", features = ["rayon"] } rustc-hash = "2.0" dunce = "1.0" [target.'cfg(not(any(target_arch = "wasm32", target_os = "android", target_os = "ios")))'.dependencies] serde_json = { version = "1.0", optional = true } minidumper = { version = "0.8", optional = true } crash-handler = { version = "0.6", optional = true } minidump = { version = "0.22", optional = true } linkme = { version = "=0.3.28", optional = true } uuid = { version = "1.1", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] tracing-web = "0.1" [target.'cfg(target_os = "android")'.dependencies] tracing-android = "0.2" [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(never)'] } [package.metadata.docs.rs] all-features = true rustdoc-args = ["--html-in-header", "doc/html-in-header.html"]