Cargo Features
[dependencies]
zng = { version = "0.13.6", default-features = false, features = ["view", "view_prebuilt", "http", "debug_default", "svg", "dyn_node", "inspector", "hot_reload", "dyn_app_extension", "dyn_closure", "test_util", "multi_app", "single_instance", "crash_handler", "crash_handler_debug", "trace_widget", "trace_wgt_item", "deadlock_detection", "hyphenation_embed_all", "material_icons", "material_icons_outlined", "material_icons_filled", "material_icons_rounded", "material_icons_sharp", "toml", "ron", "yaml", "view_software", "view_bundle_licenses", "ipc", "built_res", "android_game_activity", "android_native_activity", "window", "third_party", "third_party_default", "ansi_text", "checkerboard", "clipboard", "color_filter", "fs_watcher", "config", "data_context", "data_view", "dialog", "drag_drop", "grid", "image", "markdown", "menu", "progress", "rule_line", "scroll", "button", "toggle", "slider", "stack", "text_input", "tooltip", "undo", "wrap", "image_bmp", "image_dds", "image_exr", "image_ff", "image_gif", "image_hdr", "image_ico", "image_jpeg", "image_png", "image_pnm", "image_qoi", "image_tga", "image_tiff", "image_webp", "image_all"] }
- default = ansi_text, button, checkerboard, clipboard, color_filter, config, crash_handler, crash_handler_debug, data_context, data_view, debug_default, dialog, drag_drop, fs_watcher, grid, image, image_all, ipc, markdown, menu, progress, rule_line, scroll, slider, stack, text_input, third_party, third_party_default, toggle, tooltip, undo, view_software, window, wrap
-
These default features are set whenever
zng
is added without
somewhere in the dependency tree.default-features = false - view
-
Include the default view-process implementation.
Only enables in
not(target_arch = "wasm32")
builds.Enables zng-view
- view_prebuilt = ipc
-
Include the default view-process implementation as an embedded precompiled binary.
Only enables in
not(any(target_arch = "wasm32", target_os = "android", target_os = "ios"))
builds.Enables zng-view-prebuilt
- http
-
Enables HTTP tasks and web features of widgets and services.
Enables http of zng-ext-image, zng-ext-window, zng-task, and zng-wgt
zng-wgt:
widgets
- debug_default default
-
Enable the
"dyn_*"
,"inspector"
features in debug builds.Enables debug_default of zng-app, zng-wgt-inspector, zng-wgt-scroll, and zng-wgt-window
zng-app:
app
- svg = zng-ext-svg
-
Enable SVG image rendering, SBG emoji support.
Enables svg of zng-ext-font
- dyn_node
-
Use more dynamic dispatch at the node level by enabling
UiNode::cfg_boxed
to box.This speeds-up compilation time at the cost of runtime.
- inspector
-
Instrument each property and widget instance with "Inspector" nodes and extend windows to be inspected on Ctrl+Shift+I.
Enables inspector of zng-app, live of zng-wgt-inspector
- hot_reload
-
Enable hot reload builds.
Note that you must configure the target library to hot reload, see
zng::hot_reload
for details.Only enables in
not(any(target_arch = "wasm32", target_os = "android", target_os = "ios"))
builds.Enables zng-ext-hot-reload
- dyn_app_extension
-
Use dynamic dispatch at the app-extension level.
This speeds-up compilation time at the cost of runtime.Enables dyn_app_extension of zng-app
- dyn_closure
-
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.
Enables dyn_closure of zng-wgt, zng-wgt-scroll, and zng-wgt-window
- test_util
-
Test utilities.
Enables test_util of zng-app, zng-ext-window, and zng-task
- multi_app
-
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 andapp_local!
statics switch to the value of each app depending on the current thread.Not enabled by default, but enabled by
feature="test_util"
. - single_instance
-
Enables single app-process instance mode.
Builds with this feature only allow one app-process, subsequent attempts to spawn the app redirect to the running app-process.
Only enables in
not(any(target_arch = "wasm32", target_os = "android", target_os = "ios"))
builds.Enables zng-ext-single-instance
- crash_handler default
-
Allow app-process crash handler.
Builds with this feature spawn a crash monitor-process for each app-process.
Only enables in
not(any(target_arch = "wasm32", target_os = "android"))
builds.Enables crash_handler of zng-app
- crash_handler_debug default = window
-
Enable debug crash handler view.
Enables crash_handler of zng-wgt-inspector
- trace_widget
-
Instrument every widget outer-most node to trace UI methods.
Enables trace_widget of zng-app and zng-wgt-style
- trace_wgt_item
-
Instrument every property and intrinsic node to trace UI methods.
Note that this can cause very large trace files and bad performance.Enables trace_wgt_item of zng-app
- deadlock_detection
-
Spawns a thread on app creation that checks and prints
parking_lot
deadlocks.Enables deadlock_detection of zng-app
- hyphenation_embed_all
-
Embed hyphenation dictionaries for all supported languages.
If enabled some 2.8MB of data is embedded, you can provide an alternative dictionary source using the
HYPHENATION::init_data_source
method.Enables hyphenation_embed_all of zng-ext-font
- material_icons = material_icons_filled, material_icons_outlined, material_icons_rounded, material_icons_sharp
-
Include all Material Icons icon sets in the default app.
- material_icons_outlined material_icons?
-
Material Icons Outlined icon set.
If enabled some icons of this set are used for some of the commands.Enables embedded and outlined of zng-wgt-material-icons
- material_icons_filled material_icons?
-
Material Icons Filled icon set.
Enables embedded and filled of zng-wgt-material-icons
- material_icons_rounded material_icons?
-
Material Icons Rounded icon set.
Enables embedded and rounded of zng-wgt-material-icons
- material_icons_sharp material_icons?
-
Material Icons Sharp icon set.
Enables embedded and sharp of zng-wgt-material-icons
- toml
-
Enable TOML configs.
Enables toml of zng-ext-config
- ron
-
Enable RON configs.
Enables ron of zng-ext-config
- yaml
-
Enable YAML configs.
Enables yaml of zng-ext-config
- view_software default
-
Enables software renderer fallback in the default view-process.
If enabled and a native OpenGL 3.2 driver is not available the
swgl
software renderer is used. - view_bundle_licenses
-
Collects and bundles third-party licenses used by the
zng-view
crate.Needs
cargo-about
and Internet connection during build.Not enabled by default. Note that
"view_prebuilt"
always bundles licenses.Enables bundle_licenses of optional zng-view
- ipc default view_prebuilt?
-
Enables IPC tasks, pre-build views and connecting to views running in another process.
Only enables in
not(any(target_os = "android", target_arch = "wasm32", target_os = "ios"))
builds.Enables ipc of zng-app, zng-task, optional zng-view, and zng-view-api
zng-view-api:
view
- built_res
-
Check if
zng::env::res
path is available ininit_built_res
first.Enabled by default in debug builds, ignored in Android and Wasm.
- android_game_activity
-
Standard Android backend that requires a build system that can compile Java or Kotlin and fetch Android dependencies.
See
https://docs.rs/winit/latest/winit/platform/android/
for more details.Enables android_game_activity of optional zng-view
- android_native_activity
-
Basic Android backend that does not require Java.
See
https://docs.rs/winit/latest/winit/platform/android/
for more details.Enables android_native_activity of optional zng-view
- window default crash_handler_debug third_party_default
-
Enable window, monitor services, widgets and properties.
Enables zng-ext-window and zng-wgt-window
- third_party default
-
Enable third-party license service and types.
- third_party_default default = data_view, markdown, scroll, stack, text_input, toggle, window
-
Enable default third-party licenses default view.
- ansi_text default
-
Enable ANSI text widget.
Not enabled by default.Enables zng-wgt-ansi-text
- checkerboard default
-
Enable checkerboard widget.
Enables zng-wgt-checkerboard
- clipboard default
-
Enable clipboard service.
Enables zng-ext-clipboard
- color_filter default
-
Enable color filter properties.
Enables zng-wgt-filter
Affects
color::filter
… - fs_watcher default
-
Enable file system watcher service.
Enables zng-ext-fs-watcher
- config default
-
Enable the configuration service.
Enables zng-ext-config
- data_context default
-
Enable data context service and properties.
Enables zng-wgt-data
- data_view default third_party_default
-
Enable data view widget.
Enables zng-wgt-data-view
- dialog default
-
Enable modal dialog overlay widget and service.
Enables zng-wgt-dialog
- drag_drop default
-
Enable drag&drop.
Enables drag_drop of zng-ext-input and zng-wgt-input
- grid default
-
Enable grid widget.
Enables zng-wgt-grid
- image default
-
Enable image service and widget.
Enables zng-ext-image and zng-wgt-image
- markdown default third_party_default
-
Enable markdown widget.
Enables zng-wgt-markdown
-
Enable menu widgets.
Enables zng-wgt-menu
- progress default
-
Enable progress indicator widgets.
Enables zng-wgt-progress
- rule_line default
-
Enable rule line widgets.
Enables zng-wgt-rule-line
- scroll default third_party_default
-
Enable scroll widget.
Enables zng-wgt-scroll
-
Enable button widget.
Enables zng-wgt-button
- toggle default third_party_default
-
Enable toggle widgets.
Enables zng-wgt-toggle
- slider default
-
Enable slider widget.
Enables zng-wgt-slider
- stack default third_party_default
-
Enable stack widget.
Enables zng-wgt-stack
- text_input default third_party_default
-
Enable text input widgets.
Enables zng-wgt-text-input
- tooltip default
-
Enable tooltip widget.
Enables zng-wgt-tooltip
- undo default
-
Enable undo/redo service.
Enables zng-ext-undo, zng-wgt-undo, and zng-wgt-undo-history
- wrap default
-
Enable wrap widget.
Enables zng-wgt-wrap
- image_bmp
-
Enable BMP image decoder and encoder with "view" feature.
- image_dds
-
Enable DDS image decoder with "view" feature.
- image_exr
-
Enable EXR image decoder and encoder with "view" feature.
- image_ff
-
Enable Farbfeld image decoder and encoder with "view" feature.
- image_gif
-
Enable GIF image decoder and encoder with "view" feature.
- image_hdr
-
Enable Radiance HDR image decoder and encoder with "view" feature.
- image_ico
-
Enable ICO image decoder and encoder with "view" feature.
- image_jpeg
-
Enable JPEG image decoder and encoder with "view" feature.
Enables image_jpeg of optional zng-view
- image_png
-
Enable PNG image decoder and encoder with "view" feature.
- image_pnm
-
Enable PNM image decoder and encoder with "view" feature.
- image_qoi
-
Enable QOI image decoder and encoder with "view" feature.
- image_tga
-
Enable TGA image decoder and encoder with "view" feature.
- image_tiff
-
Enable TIFF image decoder and encoder with "view" feature.
Enables image_tiff of optional zng-view
- image_webp
-
Enable WEBP image decoder with "view" feature.
Enables image_webp of optional zng-view
- image_all default
-
Enable all encoders and decoders.
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.