Rust-GPU / rust-gpu

🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧
https://rust-gpu.github.io
Apache License 2.0
980 stars 27 forks source link

Add a nicer way to set features in `spirv-builder` #145

Closed LegNeato closed 1 week ago

LegNeato commented 2 weeks ago

It's pretty opaque setting features using spirv-builder:

https://github.com/Rust-GPU/rust-gpu/discussions/144

We should have a function on SpirvBuilder that makes it easy, as this is a potential common use-case.

Here are where the rustflags are set in the builder: https://github.com/Rust-GPU/rust-gpu/blob/0da80f8a61867590a0824873fa45dc8983e49da8/crates/spirv-builder/src/lib.rs#L663

schell commented 1 week ago

Depending on what you're trying to send features to, if it's the crate to be compiled you can do that in SpirvBuilder: https://github.com/Rust-GPU/rust-gpu/blob/0da80f8a61867590a0824873fa45dc8983e49da8/crates/spirv-builder/src/lib.rs#L487-L499

LegNeato commented 1 week ago

Oh weird, missed that in the docs.