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

Enables spec of kas-core

view default

optional dependencies / features

Enable view widgets

Enables 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

Enables clipboard of kas-core

markdown default

Enable Markdown parsing

Enables markdown of kas-core

shaping default

Enable text shaping

Enables shaping of kas-core

harfbuzz

Alternative: use Harfbuzz library for shaping

Enables harfbuzz of kas-core

serde json? ron? stable? toml? yaml?

Enable serde support (mainly config read/write)

Enables serde of kas-core

yaml stable? = serde

Enable support for YAML (de)serialisation

Enables yaml of kas-core

json stable? = serde

Enable support for JSON (de)serialisation

Enables json of kas-core

ron stable? = serde

Enable support for RON (de)serialisation

Enables ron of kas-core

toml stable? = serde

Enable support for TOML (de)serialisation

Enables toml of kas-core

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

Enables spawn of kas-core

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

Enables winit of kas-core

kas-core:

Enable winit support

wayland minimal

Support Wayland

Enables wayland of kas-core

x11

Support X11

Enables x11 of kas-core

unsafe_node

Optimise Node using unsafe code

Enables unsafe_node of kas-core