Rust-GPU/rust-gpu

Improve .cargo/config section in the Writing Shader Crates documentation

mbernat opened this issue · 1 comments

I wasn't able to get the instructions in the .cargo/config section of the book to work.

Here are the changes I had to make.

  • Use target = <path to target spec in spirv-builder> instead of target = <target triple>.
  • Copy rust-toolchain from rust-gpu into my repo to be able to load the codegen dylib.

Also, the .cargo/config name is deprecated, the new name is .cargo/config.toml.

I'd be happy to make a PR with these fixes to the docs, if they are indeed correct. But I'm not sure if anyone is still using the method (I only did it to learn how the pieces fit together). So, if spirv-builder and/or cargo-gpu are the main recommended approaches, another option could be to just remove the section?

Thanks for the report! AFAIK those are correct. We have been meaning to sweep through and revamp the docs for the next release but have been getting bogged down with other things.