Cargo Features

[dependencies]
zng = { version = "0.5.1", default-features = false, features = ["view", "view_prebuilt", "http", "debug_default", "dyn_node", "inspector", "dyn_app_extension", "dyn_closure", "test_util", "multi_app", "single_instance", "crash_handler", "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"] }
default = crash_handler, debug_default, ipc, view_software

These default features are set whenever zng is added without default-features = false somewhere in the dependency tree.

view

Include the default view-process implementation.

Enables zng-view

Affects view_process::default

view_prebuilt = ipc

Include the default view-process implementation as an embedded precompiled binary.

Enables zng-view-prebuilt

Affects view_process::prebuilt

http

Enables HTTP tasks and web features of widgets and services.

Enables http of zng-ext-image, 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

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.

Enables dyn_node of zng-app

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

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 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".

Enables multi_app of zng-app

single_instance

Allow single app-process instance mode.

Note that zng::app::single_instance() must be called to enable single instance mode.

Enables zng-ext-single-instance

crash_handler default

Allow app-process crash handler.

Note that zng::app::crash_handler::init(_) must be called to enable.

Enables crash_handler of zng-app and zng-wgt-inspector

trace_widget

Instrument every widget outer-most node to trace UI methods.

Enables trace_widget of zng-app

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::dictionary_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.

Enables software of optional zng-view

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.

Enables ipc of zng-app, zng-task, optional zng-view, and zng-view-api

zng-view-api:

view