Skip to content

Add bindings for spirv-opt #31

@Jake-Shadle

Description

@Jake-Shadle

We will be relying on spirv-opt for actually making the generated spirv code go brrrrr, but right now there are no rust bindings for it, so we can't call it from Rust like we need to.

There are a couple of complications to this.

  1. The code is all C++, and there's no C API
  2. CMake, because of course

For the first point, the actual API for running the optimizer seems to be fairly trivial, so I see 2 paths forward for this.

  1. Write a small C wrapper around the C++ API and write manual bindings for it
  2. Try out cxx though my guess right now is that it is overkill

As for CMake, just as with our PhysX bindings, we will obviously just build it with cc so that downstream users won't hate us.

I'm putting this issue here for now, but I am thinking that this would probably be its own repo which contains the bindings/wrapper crates in it, and it would initially just be for the spirv-opt part of spirv-tools, but obviously could add the other tools as needed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions