Giving up on wlroots-rs
A good post, thanks for sharing.<p>&gt; I want to make one (mildly controversial) thing clear: rewriting a library for the sake of only using Rust is not good engineering.<p>Strong agree.<p>&gt; A literal rewrite of a project to Rust is not interesting, it’s not useful, it just causes churn and splits ecosystems. Time would be better spent either working with existing solutions that already have the effort put in to make them correct or to come up with new green-field projects.<p>This... I&#x27;m not so sure about. It really depends on what your objective is. For example, if your goal is to learn, you&#x27;re not going to cause churn, and you&#x27;re not going to split ecosystems. Working on project you already know well is a good way to learn, because you can focus on the language, not the project.<p>This also isn&#x27;t <i>exactly</i> a re-write, in my mind. I mean it is, and it isn&#x27;t. This is because...<p>&gt; The biggest problem when wrapping wlroots was defining the ownership model of the objects that wlroots exposes.<p>The pain here isn&#x27;t a re-write, it&#x27;s an integration with an existing system. That&#x27;s a good reason to not use something different! I also think this is interesting because it demonstrates something that&#x27;s often said in discussions about Rust, but mostly in the abstract, and that&#x27;s that Rust&#x27;s rules influence the design of your system. It will guide you away from designs where the ownership of components is unclear. To many people, this is a benefit, but it can often cause struggles when learning. And, it can often cause struggles in situations like this: where you <i>can&#x27;t</i> really re-write some external component to fit in the rules.<p>That being said, there should be a way to do the ownership part that makes sense, but I don&#x27;t know wlroots well enough to comment.<p><i>That</i> being said<p>&gt; Currently there is 11 THOUSAND lines of Rust in wlroots-rs. All of this code is just wrapper code, it doesn’t do anything but memory management.<p>is also super legit. Managing this kind of thing is a pain. I can certainly understand not wanting to do it.