QtCS25 - Fontations in Qt: Adding Rust to the build system

From Qt Wiki
Jump to navigation Jump to search

Session Summary

Google are introducing a memory-safe replacement for Freetype called Fontations which is written in Rust. In general, many of their core components are being ported to Rust. If we would like to use this or other such components in Qt, we would need a build system capable of compiling the code. This will likely be needed by Qt Web Engine as well in near future..

Session Owners

Alexandru Croitor

Eskil Abrahamsen Blomfeldt

Thiago - notes

Notes

Fontations is a Rust-written library that replaces fontconfig and works in all operating systems. Google suggest we use it.

There is no C or C++ API for it. That means each toolkit using it needs to deploy their own (like Chromium does).

  • This is sub-optimal. Fontation should create and maintain the C API for other toolkits to use. Otherwise, it can get out-of-sync quickly when they update.
  • Fontation should install as a system library so we can just do a `find_dependency` or equivalent, not having to learn how to build Rust

Eskil will reach out to reply and pass on our suggestions/requirements.

How we deploy that for other systems?

  • Can vcpkg help for other users?
  • If not, the bundling functionality may need to know how to build Rust code.