Documentation
[package]
name = "kas"
version = "0.10.1"
authors = ["Diggory Hardy <git@dhardy.name>"]
edition = "2018"
license = "Apache-2.0"
description = "KAS GUI Toolkit"
readme = "README.md"
documentation = "https://docs.rs/kas/"
keywords = ["gui"]
categories = ["gui"]
repository = "https://github.com/kas-gui/kas"
exclude = ["/examples"]
resolver = "2"

[package.metadata.docs.rs]
features = ["nightly"]
rustdoc-args = ["--cfg", "doc_cfg"]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --features=nightly,internal_doc --all --no-deps --open

[features]
default = ["theme", "wgpu", "winit", "yaml", "svg", "canvas", "clipboard", "markdown", "shaping", "stack_dst"]

# Enable theme support:
theme = ["kas-theme"]
#Enable WGPU backend:
wgpu = ["kas-wgpu"]

# Enable dynamic linking (faster linking via an extra run-time dependency):
dynamic = ["kas-dylib"]

# Enables usage of unstable Rust features
nightly = ["min_spec", "kas-theme/nightly", "kas-wgpu/nightly", "unsize"]

# Use Generic Associated Types (this is too unstable to include in nightly!)
gat = ["kas-core/gat", "kas-theme/gat", "kas-wgpu/gat"]

# Use min_specialization (enables accelerator underlining for AccelLabel)
min_spec = ["kas-widgets/min_spec"]
# Use full specialization
spec = ["min_spec", "kas-core/spec"]

# Enables documentation of APIs for shells and internal usage.
# 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.
internal_doc = ["kas-core/internal_doc", "kas-theme/internal_doc"]

# Enables clipboard read/write
clipboard = ["kas-wgpu/clipboard"]

# Enable Markdown parsing
markdown = ["kas-core/markdown"]

# Enable text shaping
shaping = ["kas-core/shaping"]
# Alternative: use Harfbuzz library for shaping
harfbuzz = ["kas-core/harfbuzz"]

# Enable config read/write
#TODO(cargo): once weak-dep-features (cargo#8832) is stable, add "winit?/serde"
# and remove the serde feature requirement under dependencies.winit.
config = ["kas-core/config", "kas-theme/config"]

# Enable support for YAML (de)serialisation
yaml = ["config", "kas-core/yaml"]

# Enable support for JSON (de)serialisation
json = ["config", "kas-core/json"]

# Enable support for RON (de)serialisation
ron = ["config", "kas-core/ron"]

# Support canvas widget
canvas = ["kas-resvg/canvas"]

# Support SVG images
svg = ["kas-resvg/svg"]

# Inject logging into macro-generated code.
# Requires that all crates using these macros depend on the log crate.
macros_log = ["kas-core/macros_log"]

stack_dst = ["kas-core/stack_dst", "kas-theme/stack_dst", "kas-wgpu/stack_dst"]

# Use the unstable 'unsize' feature
unsize = ["kas-theme/unsize", "kas-wgpu/unsize"]

winit = ["kas-core/winit"]

[dependencies]
kas-core = { version = "0.10.1", path = "crates/kas-core" }
kas-dylib = { version = "0.10.0", path = "crates/kas-dylib", optional = true }
kas-widgets = { version = "0.10.0", path = "crates/kas-widgets" }
kas-resvg = { version = "0.10.0", path = "crates/kas-resvg" }
kas-theme = { version = "0.10.0", path = "crates/kas-theme", optional = true, default-features = false }

[dependencies.kas-wgpu]
version = "0.10.0"
path = "crates/kas-wgpu"
optional = true
default-features = false
features = ["raster"]

[dev-dependencies]
chrono = "0.4"
env_logger = "0.9"
log = "0.4"

[workspace]
members = [
    "crates/kas-core",
    "crates/kas-dylib",
    "crates/kas-macros",
    "crates/kas-resvg",
    "crates/kas-theme",
    "crates/kas-wgpu",
    "crates/kas-widgets",
    "examples/mandlebrot",
]