[Mesa-dev] Rust drivers in Mesa
alyssa.rosenzweig at collabora.com
Wed Oct 14 22:17:26 UTC 2020
> I have found that other tools like RAII/drop, the closely related smart
> pointer types, and safe containers (vectors, strings etc.) even without
> the borrow checker niceties, to be relatively more useful in preventing
> memory errors. However, these are features that modern C++ also offers,
> along with a seamless integration story with existing C and C++ code. I
> find that Rust has an edge in thread-safety, but I am not sure if this
> is a strong selling point in the context of Mesa, where the current
> design seems to be well served (for now) by the traditional thread
> safety patterns.
That's fair... aesthetically I've found Rust's presentation of these
patterns to be "nicer" than C++'s (although I recognize modern C++ is a
different beast than what I once learned). Techincally you're right that
both language have evolved quite some overlap.
> As an aside, as much as I like the practicality and richness of the
> crate ecosystem, which is one of the strong points of Rust, I do have
> concerns about its current security model. For example, the crates are
> not signed and thus vulnerable to several plausible attacks, like
> compromised github accounts or, even worse due to scale, compromised
> crate repositories. This is further aggravated by the sometimes large
> indirect dependency trees. Such concerns are especially relevant to Mesa
> (and other high-profile projects) since it could be an attractive target
> for malicious entities. As enticing as it could be sometimes, I would
> be very hesitant to introduce external crate dependencies at this point
> in Mesa.
As mentioned, Rust with nothing more than the standard library is still
richer than what C gives us out-of-the-box. I don't expect to need
external crates flying around, at least for backend compiler purposes.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the mesa-dev