Sway is written in C, though.
I wonder why I thought it was written in rust.
How terrible of me not to check before saying that.
Wlroots is a bit of an extreme case as the API is mostly idiomatic to low-level C and not easy to wrap in safe rust, I believe the developers are also not keen on supporting C++ either. This is intentional design choice on their part, as "language-binding-friendly" C APIs usually tend to expose some kind of reference counting or smart pointers that make it easy to adapt to a higher level language.