madsmtm / objc2

Bindings to Apple's frameworks in Rust
https://docs.rs/objc2/
MIT License
281 stars 35 forks source link

Add Metal Performance Shaders #591

Open tbetcke opened 2 months ago

tbetcke commented 2 months ago

Hi,

this is a draft pull request to add Metal Performance Shaders.

I am trying to add the MetalPerformanceShaders framework. I have followed some other PRs in how to add frameworks. But when I am running cargo run --bin header-translator I am getting the error message

─ERROR unknown unexposed attribute, name="MPS_ENUM_AVAILABLE_STARTING", fnlike=true

How do I update the libraries to deal with this? My progress so far is visible in this pull request.

madsmtm commented 9 hours ago

One troublesome thing about MPS is that it's actually an umbrella framework containing many smaller (private) frameworks. In 03d7a74f8d120b0f2030d6b1877817cf2f7385f2, I added preliminary support for this, though I think more work is still needed for this to work fully.