Linebender in October 2024: resvg stewardship

Bruce Mitchener, Daniel McNab, November 4, 2024

Linebender is an informal open-source organization working on various projects to advance the state of the art in GUI for the Rust programming language.

This month's update is very significant, featuring several crate releases and the adoption of resvg.

We would like to thank Yevhenii Reizner (RazrFalcon) for all his work on resvg, tiny-skia, and related projects. Due to some changes in his personal circumstances, he has to give up working on his collection of excellent crates and he has been seeking new homes for them to help keep the lights on. The following projects are now part of Linebender:

These crates are widely used within the ecosystem and play an important role in many software projects, and not just in Rust! Given that Linebender has a mission to provide high quality libraries for GUI and we have established processes for managing those libraries, we feel well positioned to step in and help out. Several associated repositories and projects are also now part of Linebender. These are simplecss, svgtypes, and resvg-test-suite.

We do not expect this change to significantly impact current users of resvg, usvg, or tiny-skia. Our role is a stewardship role, to allow updates to continue as needed by the community. If things work for you now, they will continue to work for you going forward.

Our plans for the near future are:

In the longer term, we will look at how the ecosystem is evolving and what’s needed or useful. The Linebender team has deep expertise in 2D rendering, including vector graphics, color and text layout, shaping, and rendering. We look forward to seeing how we can apply this to these projects.

Relicensing

We’ve already begun the process of re-licensing the resvg repository and are nearly done. The change of license will be present in the next release, which will also be our first release under the Linebender umbrella. This will allow us to share code between the Linebender crates more easily.

This process can be followed at resvg#838.

Help Wanted

We welcome pull requests and issues.

Also, with RazrFalcon becoming less involved, we’re losing a key source of knowledge about the code itself as well as the philosophy behind it. We look forward to hearing from people who use the various crates to understand how you use it, what you use it for, and what you’d like to see.

For further discussion, please use the resvg channel on the Zulip.


Alongside the work on resvg, we have been continuing work on our existing projects.

Xilem

Xilem is our flagship GUI project, inspired by SwiftUI. It lets you build user interfaces declaratively by composing lightweight views together, and will diff them to provide minimal updates to a retained layer.

Work on Xilem Web continues.

Masonry

Masonry is the widget system used by Xilem. It provides a non-opinionated retained widget tree, designed as a base layer for high-level GUI frameworks.

Daniel also provided a talk to GOSIM China 2024 about Masonry. The recording of this presentation is not yet available.

A tracing view of a single frame in Masonry. There are high-level spans with details underneath, and GPU operations are shown.

Masonry now has built-in support for tracing using Tracy, using the tracing-tracy crate.

Vello

Vello is our GPU vector renderer. It can draw large 2D scenes with high performance, using GPU compute shaders for most of the work.

The main update is the release of version 0.3.0. This release includes previously discussed support for emoji and blurred rounded rectangles. We also now no longer consider Vello to be experimental, and so would encourage you to try Vello for your projects. Raph has been working on Sparse Strip Path rendering; progress can be followed in the Zulip thread.

We do still have several known issues, but are not aware of any issues which would block wider adoption.

A to-do list desktop app, in a vertical layout: Use Floem, unchecked; Create more TODOs, checked; Join the Linebender Zulip, unchecked. There is a button labelled 'New To-Do'.

Vello is now supported as a renderer for the external Floem project, developed for the Lapce editor. Note that Lapce does not currently itself use Vello.

Parley

Parley is a text layout library. It handles text layout, mostly at the level of line breaking and resolving glyph positions.

We released Parley 0.2.0. This includes:

We have also done some follow up work, including:

Piet

Piet is a 2d graphics library which abstracts over platform-native graphics APIs. Linebender is focused on Vello rather than Piet for performance reasons, but some users may find Piet useful, as it relies on more mature renderers and is more compatible with older platforms. During October, we released Piet 0.7.0.

Some key updates from October included in this release are:

Druid

Druid is a GUI library which was a predecessor to Xilem, and an ancestor of Masonry.

We are in the process of relicensing Druid from its current license of Apache 2.0 only to the Rust ecosystem standard Apache 2.0 OR MIT dual license. If you have previously contributed to Druid, please read and respond to druid#2414. This will greatly improve cross-compatibility with the rest of the Rust ecosystem, particularly for adapting code from Druid into newer toolkits. We plan to archive the Druid repo after one more release, as we are not actively developing it; we are working to bring Xilem to parity in capability. We will also apply this license change to Xilem and Masonry, as well as Glazier, which is currently archived.

Others