Cargo Features
[dependencies]
kas = { version = "0.14.2", default-features = false, features = ["minimal", "stable", "nightly", "dynamic", "min_spec", "spec", "view", "wgpu", "internal_doc", "clipboard", "markdown", "shaping", "harfbuzz", "serde", "yaml", "json", "ron", "toml", "image", "resvg", "tiny-skia", "dark-light", "spawn", "macros_log", "winit", "wayland", "x11", "unsafe_node"] }
To build locally:
RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --features=nightly,internal_doc --all --no-deps --open
- minimal default = wayland, wgpu, winit
-
meta / build features
The minimal feature set needed to build basic applications (with assumptions about target platforms).
Note: only some examples build in this configuration; others need view,
markdown, resvg. Recommended also: clipboard, yaml (or some config format). - default stable? = clipboard, image, markdown, minimal, resvg, shaping, spawn, view
-
All recommended features for optimal experience
- stable = default, json, macros_log, ron, serde, toml, yaml
-
All standard test target features
NOTE: dynamic is excluded due to linker problems on Windows - nightly = min_spec
-
Enables "recommended" unstable features
- dynamic
-
Enable dynamic linking (faster linking via an extra run-time dependency):
Enables kas-dylib
- min_spec nightly? spec?
-
Use min_specialization (enables access key underlining for AccessLabel)
Enables min_spec of kas-widgets
- spec = min_spec
-
Use full specialization
- view default
-
optional dependencies / features
Enable view widgetsEnables kas-view
- wgpu minimal
-
Enable WGPU backend:
Enables kas-wgpu
Affects
kas::app.Default
… - internal_doc
-
Enables documentation of APIs for graphics library and platform backends.
This API is not intended for use by end-user applications and thus is omitted from built documentation by default.
This flag does not change the API, only built documentation.Enables internal_doc of kas-core and optional kas-wgpu
- clipboard default
-
Enables clipboard read/write
- markdown default
-
Enable Markdown parsing
- shaping default
-
Enable text shaping
- harfbuzz
-
Alternative: use Harfbuzz library for shaping
- serde json? ron? stable? toml? yaml?
-
Enable serde support (mainly config read/write)
- yaml stable? = serde
-
Enable support for YAML (de)serialisation
- json stable? = serde
-
Enable support for JSON (de)serialisation
- ron stable? = serde
-
Enable support for RON (de)serialisation
- toml stable? = serde
-
Enable support for TOML (de)serialisation
- image default
-
Support image loading and decoding
Enables image of kas-widgets
- resvg default
-
Enable resvg module (Canvas + Svg widgets)
Enables svg of kas-resvg, resvg of optional kas-dylib
Affects
kas::resvg
… - tiny-skia
-
Enable resvg module (Canvas only)
Enables kas-resvg
Affects
kas::resvg
… - dark-light
-
Automatically detect usage of dark theme
Not a default dependency; see https://github.com/emilk/egui/issues/2388
Enables dark-light of kas-core
- spawn default
-
Support spawning async tasks
- macros_log stable?
-
Support SVG images
Inject logging into macro-generated code.
Requires that all crates using these macros depend on the log crate.Enables macros_log of kas-core
- winit minimal
-
kas-core:
Enable winit support
- wayland minimal
-
Support Wayland
- x11
-
Support X11
- unsafe_node
-
Optimise Node using unsafe code
Enables unsafe_node of kas-core