Cargo Features

[dependencies]
kas = { version = "0.16.1", default-features = false, features = ["minimal", "stable", "nightly", "experimental", "dynamic", "nightly-diagnostics", "nightly-diagnostics-pedantic", "spec", "view", "wgpu", "vulkan", "gles", "dx12", "metal", "internal_doc", "clipboard", "accesskit", "markdown", "shaping", "serde", "yaml", "json", "ron", "toml", "image", "resvg", "tiny-skia", "dark-light", "spawn", "macros_log", "wayland", "x11", "unsafe_node"] }

To build locally:
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features=stable,internal_doc --workspace --no-deps --open

minimal default = dx12, metal, vulkan, wayland, wgpu

meta / build features

The minimal feature set needed to run basic applications (with assumptions about target platforms).

Note: only some examples build in this configuration; others need view,
markdown, resvg. Recommended also: clipboard, ron (or some config format).

default stable? = accesskit, clipboard, image, markdown, minimal, resvg, shaping, spawn, view

All recommended features for optimal experience

stable nightly? = default, json, macros_log, ron, serde, toml, x11, yaml

All standard test target features

nightly = nightly-diagnostics, stable

Enables all "recommended" features for nightly rustc

Enables nightly of kas-core

experimental = dark-light, unsafe_node

Additional, less recommendation-worthy features

dynamic

Enable dynamic linking (faster linking via an extra run-time dependency):

Enables kas-dylib

nightly-diagnostics nightly? nightly-diagnostics-pedantic?

optional dependencies / features

Enables better proc-macro diagnostics (including warnings); nightly only.

Enables nightly-diagnostics of kas-core

nightly-diagnostics-pedantic = nightly-diagnostics

Enables all proc-macro diagnostics, including pedantic warnings; nightly only.

Enables nightly-diagnostics-pedantic of kas-core

spec

Use full specialization

Enables spec of kas-core

view default

Enable view widgets

Enables kas-view

wgpu minimal

Enable WGPU backend:

Enables kas-wgpu

Affects runner::WgpuBuilder

vulkan minimal

WGPU backends

Enables vulkan of optional kas-wgpu

gles

Enables gles of optional kas-wgpu

dx12 minimal

Enables dx12 of optional kas-wgpu

metal minimal

Enables metal of optional kas-wgpu

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

accesskit default

Enable AccessKit integration

Enables accesskit of kas-core

markdown default

Enable Markdown parsing

Enables markdown of kas-core

shaping default

Enable text shaping

Enables shaping of kas-wgpu

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-core and 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 experimental?

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

wayland minimal

Support Wayland

Enables wayland of kas-core

x11 stable?

Support X11

Enables x11 of kas-core

unsafe_node experimental?

Optimize Node using unsafe code

Enables unsafe_node of kas-core