[Mesa-dev] Rust drivers in Mesa

Nirbheek Chauhan nirbheek.chauhan at gmail.com
Fri Oct 2 16:28:13 UTC 2020

On Fri, Oct 2, 2020 at 8:35 PM Dylan Baker <dylan at pnwbakers.com> wrote:
> 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.
> On the meson front cargo is incredibly hard to integrate with meson, it's
> essentially like calling cmake in autotools.

Also speaking as a meson developer, I'd like to share another point of view.

As of today, Meson's integration with Cargo is not great. The only
option you have is what Fractal does, as pointed out by Alyssa.
However, I believe that the status quo is (at least in part) a
consequence of us not merging the "unstable-cargo" Meson module[1] I
wrote back in 2017.

At the time we did not have a well-defined way to integrate Meson with
other build systems, but now we do. I think we can give that another
shot. The integration in that PR is not perfect, but it's the best
start we can get. Mostly because we need to do quite some work on
Cargo to make information available, standardization of some features
used in build.rs, and so on. Some of this has already begun[2].

But setting all this aside, as Alyssa has already mentioned, you do
not need Cargo to use Rust, and Meson already supports that use-case.
You can compile and link Rust code like you would C or C++ code using
Meson today. I think this can be a good fit for Mesa.

Overall, my point of view is that as non-contributors,
non-participants, and non-users, we have no voice in the future of
Cargo or Rust. I can completely understand why it has been hard to
work with them; it would be the same with any other FOSS project. The
fix is straightforward: start using it, start participating, and
*then* we will be in a position to complain and work together in
making change happen.

The fundamental property of software is that no one fixes anything
till someone really wants it fixed.


1. https://github.com/mesonbuild/meson/pull/2617
2. https://docs.rs/system-deps/1.3.1/system_deps/

More information about the mesa-dev mailing list