Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit 5721eb3

Browse files
committed
xtask: support git revs for rust_gpu_version arg
1 parent 5926363 commit 5721eb3

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

crates/xtask/src/main.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,19 @@ impl ShaderCrateTemplateCargoTomlWriter {
132132
fn replace_spirv_std_version(&mut self, version: String) -> anyhow::Result<()> {
133133
let dependencies = self.get_cargo_dependencies_table();
134134
let spirv_std = dependencies.get_mut("spirv-std").unwrap();
135-
*spirv_std = toml::Value::String(version);
135+
if version.contains(".") {
136+
// semver
137+
*spirv_std = toml::Value::String(version);
138+
} else {
139+
// git rev
140+
*spirv_std = toml::Value::Table(toml::Table::from_iter([
141+
(
142+
"git".to_string(),
143+
toml::Value::String("https://github.com/Rust-GPU/rust-gpu".to_string()),
144+
),
145+
("rev".to_string(), toml::Value::String(version)),
146+
]));
147+
}
136148
self.write_shader_crate_cargo_toml_changes()?;
137149
Ok(())
138150
}

0 commit comments

Comments
 (0)