[Mesa-dev] Rust drivers in Mesa

Jacob Lifshay programmerjake at gmail.com
Wed Oct 14 07:27:44 UTC 2020


On Tue, Oct 13, 2020, 23:52 Thomas Zimmermann <tzimmermann at suse.de> wrote:

> Hi
>
> On Tue, 13 Oct 2020 13:01:58 -0700 Eric Anholt <eric at anholt.net> wrote:
>
> > On Tue, Oct 13, 2020 at 12:08 AM Thomas Zimmermann <tzimmermann at suse.de>
> > wrote:
> > >
> > > Hi
> > >
> > > On Fri, 02 Oct 2020 08:04:43 -0700 "Dylan Baker" <dylan at pnwbakers.com>
> > > wrote:
> > >
> > > > I have serious concerns about cargo and crate usage. Cargo is
> basically
> > > > npm for rust, and shares all of the bad design decisions of npm,
> > > > including linking multiple versions of the same library together and
> > > > ballooning dependency lists that are fetched intrigued from the
> > > > internet. This is both a security problem and directly in conflict
> with
> > > > meson's design off one and only one version of a project. And while
> > > > rust prevents certain kinds of bugs, it doesn't prevent design bugs
> or
> > > > malicious code. Add a meson developer the rust community has been
> > > > incredibly hard to work with and basically hostile to every request
> > > > we've made "cargo is hour you build rust", is essentially the answer
> > > > we've gotten from them at every turn. And if you're not going to use
> > > > cargo, is rust really a win? The standard library is rather minimal
> > > > "because just pull in 1000 crates". The distro people can correct me
> if
> > > > I'm wrong, but when librsvg went to rust it was a nightmare, several
> > > > distros went a long time without u
> > >  pdates because of cargo.
> > >
> > > I can't say much about meson, but using Rust has broken the binaries of
> > > several packages on i586 for us; which consequently affects Gnome and
> KDE.
> > > [1][2] Rust uses SSE2 instructions on platforms that don't have them.
> > > There's a proposed workaround, but it's not yet clear if that's
> feasible
> > > in practice.
> > >
> > > Best regards
> > > Thomas
> > >
> > > [1] https://bugzilla.opensuse.org/show_bug.cgi?id=1162283
> > > [2] https://bugzilla.opensuse.org/show_bug.cgi?id=1077870
> >
> > From the first bug:
> >
> > >Not entirely sure what to do about this. i586 is unsupported by Rust
> (tier
> > >2) and as such the package is built for i686
> >
> > This really sounds like your distro is just building with the wrong
> > rust target for packages targeting an earlier processor.
>
> Every other language/compiler combination appears to get this right. And
> even
> i686 does not require SSE2. As I said before, there might be a
> workaround.
>

Rust has co-opted i586-unknown-linux-gnu to mean x86-32 without SSE
and i686-unknown-linux-gnu to mean x86-32 with SSE2 (technically it
implements it by using the pentium4 target cpu, so may require more than
just SSE2).

Rust just doesn't provide official binaries for i586-unknown-linux-gnu --
that does not imply that rustc and cargo won't work fine if they are
recompiled for i586-unknown-linux-gnu. The only major caveat I'd expect is
floats having slightly different semantics due to x87, which may cause some
of rustc's tests to fail.

Jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20201014/679bf766/attachment.htm>


More information about the mesa-dev mailing list