Cargo Features

[dependencies]
zng-app-context = { version = "0.3.4", default-features = false, features = ["multi_app", "debug_default", "dyn_closure"] }
default = debug_default

The debug_default feature is set by default whenever zng-app-context is added without default-features = false somewhere in the dependency tree.

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.

debug_default default

Enable "multi_app" in debug builds.

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.