Niri: Experience Building a Wayland Compositor in Rust
summary
An experience report on building the Wayland compositor niri in Rust, covering how Wayland I/O and async programming are integrated with shared global state, using proptest for randomized testing to ensure logic correctness, and using the Tracy profiler plus a custom tester to measure input latency. It names Rust, Wayland, proptest, Tracy, and discusses compositor responsibilities like input event dispatch, monitor rendering, window layout and screen recording frame preparation.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:54What is a Wayland compositor
- 3:20Goals of compositor
- 4:06Why use compositor libraries
- 5:07Wayland protocol basics
- 7:39Rust async calls
- 9:28Maintaining compositor correctness
- 11:44Testing compositor
- 12:49Mock testing window layout
- 14:56Property testing with proptest
- 17:44Visual testing with animations
- 18:49User feedback and config tests
- 19:10Profiling with Tracy
- 25:16Debugging memory leaks
- 26:38Latency testing hardware
- 28:48Rust challenges in compositors
- 30:33Conclusion and Q&A
