Hi folks,

Does anybody remember VkRunner? It’s a little tool to help write
shader-based tests for Vulkan. It’s the same concept as Piglit’s
shader_runner but for Vulkan instead of OpenGL. There are a couple of
tests using it in Piglit but apart from that it never really got off the
ground.

Anyway, I’ve been trying to learn some Rust lately and in order to get
some experience working with a non-trivial project I decided to port
VkRunner to Rust. The port is now complete and available here:

https://github.com/bpeel/vkrunner/

It’s a drop-in replacement for the original VkRunner so it should be
possible to start using it in a CI system by just changing the git repo,
assuming the rust compiler is installed. I was thinking that now that
Mesa has some Rust code in it anyway it might not be too unreasonable to
expect CI systems to have the Rust compiler available.

Other than that there’s not much advantage to using one or the other
except for the warm fuzzy feeling knowing that you’re using a project
written in a memory-safe language. I also took the opportunity to add a
whole bunch of unit tests so in theory the Rust port might be more
robust.

It’s currently using Meson as the build system. In the beginning this
was necessary because I did the port gradually and it’s probably the
best build system if you have a mix of C and Rust code. Now that the
port is complete it’d probably be trivial to start using Cargo instead.
I’m not sure which would be better. It’s not using any external crates
so it doesn’t really need Cargo for now.

Now that the port is complete it might be nice to start adding more
features. If anyone else hasn’t taken the plunge to start using Rust yet
this might be a nice project to get involved in if you fancy helping.

Kind regards,
– Neil

Reply via email to