openkit 0.1.3

A cross-platform CSS-styled UI framework for Rust
Documentation
[workspace]
members = [".", "openkit-macros"]

[package]
name = "openkit"
version = "0.1.3"
edition = "2024"
description = "A cross-platform CSS-styled UI framework for Rust"
license = "MIT OR Apache-2.0"
repository = "https://github.com/pegasusheavy/openkit"
homepage = "https://github.com/pegasusheavy/openkit"
documentation = "https://docs.rs/openkit"
readme = "README.md"
authors = ["Pegasus Heavy Industries"]
keywords = ["gui", "ui", "css", "cross-platform", "desktop"]
categories = ["gui", "rendering"]
rust-version = "1.85"

[features]
default = ["gpu", "macros", "native-platform"]
gpu = ["wgpu"]
macros = ["openkit-macros"]

# Platform auto-detection (enabled by default)
# This enables the appropriate backend for each platform automatically
native-platform = []

# Linux display backends (can be enabled explicitly)
wayland = ["winit/wayland", "winit/wayland-csd-adwaita"]
x11 = ["winit/x11"]

# High-performance GPU features
gpu-profiling = ["gpu"]
hdr = ["gpu"]

# Platform-specific feature bundles for explicit control
windows = []
macos = []
linux = ["x11", "wayland"]
freebsd = ["x11"]

[dependencies]
# Proc macros (optional, enabled by default)
openkit-macros = { version = "0.1.3", path = "openkit-macros", optional = true }
# Windowing
winit = "0.30"

# GPU Rendering (optional, enabled by default)
wgpu = { version = "23", optional = true }

# Vertex buffer data casting (required for GPU)
bytemuck = { version = "1", features = ["derive"] }

# CPU Rendering fallback
tiny-skia = "0.11"

# Text rendering
cosmic-text = "0.12"

# CSS parsing
cssparser = "0.34"

# Image loading
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp"] }

# Color handling
palette = "0.7"

# Logging
log = "0.4"
env_logger = "0.11"

# Error handling
thiserror = "2"

# Async runtime for wgpu
pollster = "0.4"

# Raw window handle for wgpu integration
raw-window-handle = "0.6"

# Ordered float for CSS values
ordered-float = "4"

# Smallvec for performance
smallvec = "1"

# Unicode segmentation for text
unicode-segmentation = "1"

# NOTE: OpenKit does NOT depend on platform-specific UI libraries.
# All rendering (windows, widgets, chrome) is done via wgpu/tiny-skia.
# Platform windowing is handled entirely by winit.

[dev-dependencies]
pretty_assertions = "1"
criterion = { version = "0.5", features = ["html_reports"] }

# Benchmarks
[[bench]]
name = "css_parsing"
harness = false

[[bench]]
name = "layout"
harness = false

[[bench]]
name = "rendering"
harness = false

[[bench]]
name = "text"
harness = false

[[bench]]
name = "widget_tree"
harness = false

[profile.bench]
lto = true
codegen-units = 1

[profile.release]
lto = true
codegen-units = 1
panic = "abort"

[[example]]
name = "hello_world"
path = "examples/hello_world.rs"

[[example]]
name = "theme_toggle"
path = "examples/theme_toggle.rs"

[[example]]
name = "angular_style"
path = "examples/angular_style.rs"

[[example]]
name = "custom_css"
path = "examples/custom_css.rs"