#declarative-ui

kas

A pure-Rust GUI toolkit with stateful widgets

25 releases (14 breaking)

0.14.2 Dec 12, 2023
0.14.0-alpha Sep 8, 2023
0.13.0 Feb 28, 2023
0.12.1 Dec 22, 2022
0.0.2 Jan 24, 2019

#264 in GUI

Download history 22/week @ 2023-11-03 34/week @ 2023-11-10 14/week @ 2023-11-17 57/week @ 2023-11-24 50/week @ 2023-12-01 92/week @ 2023-12-08 44/week @ 2023-12-15 63/week @ 2023-12-22 6/week @ 2023-12-29 41/week @ 2024-01-05 16/week @ 2024-01-12 33/week @ 2024-01-19 34/week @ 2024-01-26 31/week @ 2024-02-02 67/week @ 2024-02-09 513/week @ 2024-02-16

646 downloads per month
Used in kas-gtk

Apache-2.0

1.5MB
24K SLoC

KAS GUI

Test Status Crates.io kas-text Docs Minimum rustc version

KAS is a stateful, pure-Rust GUI toolkit supporting:

  • Mostly declarative UI descriptions despite stateful widgets
  • Custom widgets using state for caches and input state (e.g. selection range)
  • Virtual scrolling (list or matrix), including support for external data sources
  • Theme abstraction including theme-driven animations and sizing
  • Multiple renderer backends
  • Integrated i18n support
  • Accessibility tool integration
  • Platform integration: persistent configuration, theme discovery, external menus, IME
  • Most of the basics you'd expect: complex text, fractional scaling, automatic margins
  • Extremely fast, monolithic binaries

More

Crates and features

kas is a meta-package serving as the library's public API, yet containing no real code. Other crates in this repo:

Significant external dependencies:

  • kas-text: complex text support
  • impl-tools: autoimpl and impl_scope (extensible) macros
  • winit: platform window integration
  • wgpu: modern accelerated graphics API

Feature flags

The kas crate enables most important features by default, excepting those requiring nightly rustc. Other crates enable fewer features by default. See Cargo.toml.

The COPYRIGHT file includes a list of contributors who claim copyright on this project. This list may be incomplete; new contributors may optionally add themselves to this list.

The KAS library is published under the terms of the Apache License, Version 2.0. You may obtain a copy of this licence from the LICENSE file or on the following webpage: https://www.apache.org/licenses/LICENSE-2.0

Dependencies

~3–52MB
~770K SLoC