Wednesday
Room 3
11:40 - 12:40
(UTC+02)
Talk (60 min)
Can a Rust API for QML Be Ergonomic? And "Safe"?
QML is a declarative language based on JavaScript for building user interfaces. It is the modern way to use the UI framework Qt, built on top of C++. Within the QtBridges project, we aim to bring the blessing of QML and C++ to the Rust world. The goal is an ergonomic Rust API for QML that lets developers combine Qt frontends with Rust backends.
The project puts considerable effort into ergonomics, which translates into two questions: Can a Rust API represent the many C++ concepts accumulated over the years without leaking its heritage everywhere? And can this API be "safe" enough to free users from littering their code with unsafe blocks? We consider both essential for a truly ergonomic API.
In this talk, we present our greatest hits of whack-a-mole with raw pointers, wrapping wrappers to hide C++ from our users, and wrestling with Rust concepts that don't survive the language boundary. We explore what "safe" means in terms of Rust and whether a library built on a substantial C++ backend can ever truly claim to be so. We'll show off what works, own up to what doesn't, and share what keeps us up at night.
