# linebender/druid

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/linebender-druid).**

9,710 stars · 564 forks · Rust · Apache-2.0

## Links

- GitHub: https://github.com/linebender/druid
- Homepage: https://linebender.org/druid/
- awesome-repositories: https://awesome-repositories.com/repository/linebender-druid.md

## Description

Druid is a native user interface toolkit and 2D graphics engine for the Rust programming language. It functions as a retained-mode, data-driven framework for building graphical user interfaces that run across Linux, macOS, and web browsers via WebAssembly.

The toolkit distinguishes itself through a data-first approach to UI design, utilizing lenses to isolate subsets of global application state and synchronize them with specific widgets. This allows the visual layout to update automatically when the underlying data model changes.

Its capability surface includes a constraint-based box layout system for component positioning, a platform-abstraction layer for native event handling, and a vector graphics engine for drawing shapes and text. The framework also covers desktop window management, including multi-window coordination, system file dialogs, and hierarchical application menu systems.

## Tags

### User Interface & Experience

- [Cross-Platform GUI Toolkits](https://awesome-repositories.com/f/user-interface-experience/cross-platform-gui-toolkits.md) — Functions as a comprehensive framework for building graphical user interfaces across Linux, macOS, and web browsers.
- [Cross-Platform UI Toolkits](https://awesome-repositories.com/f/user-interface-experience/cross-platform-ui-toolkits.md) — Provides a complete toolkit for building native-like GUIs from a single codebase for Linux, macOS, and the web.
- [Data-Driven UI Libraries](https://awesome-repositories.com/f/user-interface-experience/data-driven-ui-libraries.md) — Functions as a data-driven framework that synchronizes global application state with the visual layout using lenses. ([source](https://github.com/linebender/druid/blob/master/Cargo.toml))
- [Cross-Platform Abstractions](https://awesome-repositories.com/f/user-interface-experience/cross-platform-abstractions.md) — A common interface for interacting with different application frameworks while hiding backend-specific implementation details. ([source](https://github.com/linebender/druid/tree/master/druid-shell))
- [Custom Widget Definitions](https://awesome-repositories.com/f/user-interface-experience/custom-components/custom-widget-definitions.md) — Allows developers to define bespoke UI components by implementing standard traits for event handling, layout, and painting. ([source](https://github.com/linebender/druid/blob/master/druid/examples/custom_widget.rs))
- [Custom Widget Implementation](https://awesome-repositories.com/f/user-interface-experience/custom-widget-frameworks/custom-widget-implementation.md) — Allows for the design of specialized interface components by implementing custom logic for layout, events, and rendering.
- [State-Synchronized Bindings](https://awesome-repositories.com/f/user-interface-experience/data-binding-frameworks/state-synchronized-bindings.md) — Automatically synchronizes UI elements with application state changes through reactive bindings. ([source](https://github.com/linebender/druid/blob/master/druid/examples/calc.rs))
- [Desktop Applications](https://awesome-repositories.com/f/user-interface-experience/desktop-applications.md) — Provides a framework specifically for building cross-platform desktop GUI applications.
- [Event-Driven UI Frameworks](https://awesome-repositories.com/f/user-interface-experience/event-driven-ui-frameworks.md) — Utilizes an architectural pattern where UI state and interactions are managed through a system of commands and messages. ([source](https://github.com/linebender/druid/tree/master/druid))
- [DOM Event Listeners](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/interaction-and-event-handling/event-handling-architectures/event-handling/dom-event-listeners.md) — Provides mechanisms to attach listeners to interface elements that execute logic upon user interaction. ([source](https://github.com/linebender/druid/blob/master/druid-shell/examples/shello.rs))
- [Rust Native Toolkits](https://awesome-repositories.com/f/user-interface-experience/native-widget-toolkits/rust-native-toolkits.md) — Provides a data-first native UI framework implemented specifically for the Rust programming language.
- [Retained State UI Frameworks](https://awesome-repositories.com/f/user-interface-experience/retained-state-ui-frameworks.md) — Maintains a persistent tree of widgets that automatically updates the view when state changes.
- [Constraint Based Layouts](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/css-layout-systems/constraint-based-layouts.md) — Implements a constraint-based box layout system where components negotiate dimensions based on parent-provided constraints. ([source](https://github.com/linebender/druid/blob/master/README.md))
- [Widget Data Bindings](https://awesome-repositories.com/f/user-interface-experience/widget-data-bindings.md) — Connects application data sources directly to interface elements to isolate state updates. ([source](https://github.com/linebender/druid#readme))
- [Dynamic List Rendering](https://awesome-repositories.com/f/user-interface-experience/dynamic-list-rendering.md) — Supports efficient rendering of data collections that automatically update the view when items are modified. ([source](https://github.com/linebender/druid/blob/master/druid/examples))
- [Event Routing Systems](https://awesome-repositories.com/f/user-interface-experience/event-routing-systems.md) — Provides a mechanism for routing targeted commands to specific widgets within the UI element tree.
- [Layout Composition Frameworks](https://awesome-repositories.com/f/user-interface-experience/layout-composition-frameworks.md) — Enables the construction of complex interfaces by nesting widgets, flex containers, and custom painters. ([source](https://github.com/linebender/druid#readme))
- [Content State Toggling](https://awesome-repositories.com/f/user-interface-experience/layout-utilities/presentation-engines/ui-rendering-patterns/conditional-visibility-toggling/content-state-toggling.md) — Provides the ability to toggle between different UI components based on boolean state values to handle various application statuses. ([source](https://github.com/linebender/druid/blob/master/druid/examples))
- [Native Event Streams](https://awesome-repositories.com/f/user-interface-experience/native-event-streams.md) — Bridges native OS event streams into a standard representation for the UI framework. ([source](https://github.com/linebender/druid#readme))
- [macOS Renderers](https://awesome-repositories.com/f/user-interface-experience/native-ui-component-libraries/native-ui-renderers/macos-renderers.md) — Utilizes native macOS graphics tools for hardware-accelerated user interface rendering. ([source](https://github.com/linebender/druid/blob/master/CHANGELOG.md))
- [Targeted Widget Messaging](https://awesome-repositories.com/f/user-interface-experience/targeted-widget-messaging.md) — Enables sending targeted instructions to specific widgets using unique identity identifiers. ([source](https://github.com/linebender/druid/blob/master/druid/examples))
- [Vector Graphics Rendering](https://awesome-repositories.com/f/user-interface-experience/vector-graphics-rendering.md) — Provides high-fidelity rendering of scalable vector graphics as native widgets within the UI. ([source](https://github.com/linebender/druid/blob/master/druid/examples))
- [Multi-Window Controllers](https://awesome-repositories.com/f/user-interface-experience/window-management/multi-window-controllers.md) — Supports the creation and coordination of multiple independent native windows within a single application session. ([source](https://github.com/linebender/druid/blob/master/druid/examples))
- [Window Lifecycle Controllers](https://awesome-repositories.com/f/user-interface-experience/window-management/window-lifecycle-controllers.md) — Provides APIs for managing the lifecycle of native windows, including their creation, focus, and termination. ([source](https://github.com/linebender/druid/blob/master/druid-shell/examples/shello.rs))

### Graphics & Multimedia

- [Custom Shape Rendering](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/engines/canvas-vector-graphics/custom-shape-rendering.md) — Provides a 2D graphics engine for rendering vector shapes and lines directly onto the window using a paint context. ([source](https://github.com/linebender/druid/blob/master/druid-shell/examples/shello.rs))
- [2D Rendering Engines](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/webgl-gpu-rendering/2d-rendering-engines.md) — Ships a rendering engine for drawing vector paths, shapes, and text layouts across multiple backends. ([source](https://github.com/linebender/druid#readme))
- [Abstraction-Layer Rendering Backends](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/abstraction-layer-rendering-backends.md) — Implements an abstraction layer that decouples 2D scene logic from specific native graphics APIs.
- [Main Axis Alignment](https://awesome-repositories.com/f/graphics-multimedia/visualization-mapping/axis-appearance-configurations/main-axis-alignment.md) — Positions child components along primary layout axes using configurable distribution and alignment rules. ([source](https://github.com/linebender/druid/blob/master/druid/examples/flex.rs))

### Mobile Development

- [Data-View Synchronizers](https://awesome-repositories.com/f/mobile-development/distribution-updates/over-the-air-updates/data-view-synchronizers.md) — Automatically synchronizes user interface elements when the underlying data model changes.

### Software Engineering & Architecture

- [State Mapping](https://awesome-repositories.com/f/software-engineering-architecture/state-mapping.md) — Uses functional lenses to map specific subsets of global application state to individual widgets.
- [Asynchronous Event Dispatchers](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-event-dispatchers.md) — Implements systems to offload event handler execution to managed thread pools to prevent blocking the UI. ([source](https://github.com/linebender/druid/blob/master/druid/examples))
- [Platform Abstraction Layers](https://awesome-repositories.com/f/software-engineering-architecture/platform-abstraction-layers.md) — Decouples application logic from native operating system windowing and input event lifecycles.

### Development Tools & Productivity

- [Native Windowing](https://awesome-repositories.com/f/development-tools-productivity/macos-utilities/native-window-contexts/native-windowing.md) — Manages the lifecycle of native application windows, including system menus and file dialogs.

### DevOps & Infrastructure

- [Linux UI Rendering](https://awesome-repositories.com/f/devops-infrastructure/linux-deployment-tools/linux-ui-rendering.md) — Renders user interfaces on Linux distributions using X11 or Wayland windowing protocols. ([source](https://github.com/linebender/druid/blob/master/CHANGELOG.md))

### Operating Systems & Systems Programming

- [Input Event Loops](https://awesome-repositories.com/f/operating-systems-systems-programming/input-event-loops.md) — Implements a non-blocking event loop to handle window and input interactions across platforms. ([source](https://github.com/linebender/druid/tree/master/druid))

### Programming Languages & Runtimes

- [Widget Composition Traits](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/language-features/language-extensions/trait-implementations/widget-composition-traits.md) — Defines UI components by implementing standard traits for event handling, layout, and rendering.

### Web Development

- [Web-Based UI Deployment](https://awesome-repositories.com/f/web-development/web-based-ui-deployment.md) — Enables compilation and execution of native user interface applications within web browsers. ([source](https://github.com/linebender/druid/blob/master/druid/examples))
- [UI Rendering Engines](https://awesome-repositories.com/f/web-development/webassembly-frameworks/ui-rendering-engines.md) — Employs a WebAssembly-based engine to render consistent user interfaces across browsers. ([source](https://github.com/linebender/druid/blob/master/CHANGELOG.md))

### Part of an Awesome List

- [UI Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/ui-frameworks.md) — Data-first gui design toolkit.
