Welcome to the homepage for the Linebender organization.
We are a friendly group of people who share an interest in 2D graphics and user interface design, with everything that entails. Most of our projects are developed in the Rust programming language. We hang out on the Linebender Zulip and always welcome new people.
Linebender projects
Below is a list of the main Linebender projects, and a short description of each project's purpose, as of 2023-04-22.
Crates (actively developed)
These crates are under active development.
-
xilem
- An experimental Rust architecture for reactive UI.Xilem is a new UI toolkit with a medium-grained reactive architecture strongly inspired by SwiftUI. It is an evolution of Druid, aiming to keep what is good while improving on Druid's shortcomings.
-
vello
- An experimental GPU compute-centric 2D renderer.This crate contains a set of compute shaders and a framework for rasterizing 2D geometry on the GPU. The goal is high performance, low resource usage and easy interoperability between platforms.
-
glazier
- An experimental windowing library.This crate provides access to the platform API, in order to create windows and contexts to draw to, and to feed platform events like keypresses and mouse/touch events into an application. It serves a similar purpose to
winit
, and indeed eitherwinit
orglazier
can be used as the windowing layer withvello
. It exists because our requirements for Xilem slightly differ from the goals ofwinit
: we want to optimize for rich desktop applications, including things like menus, contrasted towinit
which is more focused on fully custom drawn applications like games. -
kurbo
- A library for creating, manipulating and interrogating 2D curve shapes.At its core,
kurbo
is a library for constructing paths and splines out of straight lines and Bézier curves up to order 3 (known as cubic Béziers). It turns out that a series of cubic Bézier curves can be used to approximate any smooth curve with a very high degree of accuracy, compared to the number of curves required. They are also relatively easy to work with, and form the basis of the approach to curve rendering used invello
. The key abstraction iskurbo::Shape
, which provides thepath_elements
method. This method returns an iterator over Bézier curves that approximate the type implementing theShape
trait, whichvello
can then draw. -
peniko
- A library for non-geometric drawing primitives.This crate provides a set of shared types for concepts that are important for drawing/stroking paths, but excluding the path geometry itself (which can be found in
kurbo
). It includes types for brush styles (including gradient) and color.
The following crates are not part of the xilem
/vello
stack, but are under active development.
velato
- A crate that renders Lottie animations tovello
.norad
- A crate for reading, writing, and manipulating Unified Font Object files, a common font-design format.
Crates (passively maintained)
-
druid
- A GUI framework for Rust.druid
is the original Linebender UI framework, and was the main focus of development until early 2023. There are many good things aboutdruid
, but the data model it uses (primarilyLens
es) gets complicated in Rust, and doesn't compose as well as it would in a GC'd functional programming language. However, a lot of the things that work will be copied straight over toxilem
, and todaydruid
is a solid choice for a new UI app projected to have low to medium complexity. The #druid-help channel on Zulip is still monitored and you will likely get good answers to any questions you have. -
piet
- An abstraction layer over platform 2D rendering facilities.The purpose of the
piet
library is to provide abstraction over the libraries used for 2D rendering on any particular platform (Direct2D on Windows, Core Graphics on Mac, and cairo/pango on Linux). The goal is forpiet
to be superseded by thevello
crate, which will provide state-of-the-art 2D rendering on any platform supported by WebGPU. -
druid-shell
- The windowing library fordruid
.It lives in the
druid
repository. When our focus moved over tovello
/xilem
, there was debate over whether to split this code into its own crate, or move over towinit
. We decided to keep using our own windowing library for now, to give us the flexibility to add or change what we need to. Thusglazier
was born as a fork ofdruid-shell
. -
druid-widget-nursery
- A crate with widgets fordruid
.This crate contains lots of
druid
widgets that may be useful to UI developers. It includes things like widgets for Material Icons, and a tree view (a way to draw data stored in a tree). It followed the very liberal optimistic merging strategy for handling PRs to minimize contributor friction, but the widgets contributed are all robust and high quality. -
runebender
- An experimental font editor.This was the motivating application for
druid
development. It is not currently seeing active development, but this may be revisited in the future. -
skribo
- A library for text layout.This library aims to perform the conversion from text and font attributes to glyph runs, similar to harfbuzz. It's not recommended to use this library as better alternatives exist, for example
parley
orcosmic-text
.
Non-code repos
-
2d.graphics
- A work-in-progress book explaining the current state of the art of different aspects of 2D graphics.Currently the book mostly contains annotated reference lists, although some sections have written content. Pull requests welcome! The goal is to cover topics like color, shapes/curves, 2D GPU rendering, text, etc.
-
linebender.github.io
- This website. If you see anything that looks incorrect, please submit a PR to the repo.