[Migrated] spirv-builder should declare dependencies on Cargo.toml files.
Opened this issue · 3 comments
Issue automatically imported from old repo: EmbarkStudios/rust-gpu#404
Old labels: t: enhancement,s: needs update
Originally creatd by eddyb on 2021-02-01T12:18:03Z
For #403 I changed the workspace Cargo.toml, but that didn't result in a rebuild of sky-shader, whereas something like this does cause a rebuild (of example-runner-wgpu, in this example):
[profile.dev.package."example-runner-wgpu"]
opt-level = 3So I think we need spirv-builder to get the workspace Cargo.toml (and Cargo.lock, I suppose) paths from Cargo somehow, and also list those out as "rebuild if changed".
Comment from khyperia (CONTRIBUTOR) on 2021-12-08T10:05:05Z
Hm, thinking about this, is this something that should be fixed in rust-gpu, with manually finding the Cargo.toml somehow (or even more somehow, extracting from cargo), or something that cargo should do when ingesting rustc's .d file and outputting its custom cargo-mangled .d file? (the difference between deps/compute_shader.d and libcompute_shader.d) - if cargo automatically included the relevant files in its .d file, rust-gpu would "just work".
Comment from oisyn (CONTRIBUTOR) on 2022-11-16T09:55:01Z
There currently is no example or test within rust-gpu that actually uses spirv-builder
Comment from eddyb (CONTRIBUTOR) on 2022-11-25T09:14:05Z
that actually uses
spirv-builder
To be clear, there is, but not from a build script (except for... Android and wasm, I think?)
And that's because of the hot reloading feature. IMO we should do both: build them in the build script, and have hot reloading as an optional Cargo package feature, so people can know what they can ignore from the example, when they don't want to implement hot reloading themselves (and ideally all the logic that ash and wgpu examples want to share should be in one shared crate).