Skip to content

Commit e28ea77

Browse files
committed
Support [*.metadata.rust-gpu.*] sections of Cargo.toml inside of build scripts
1 parent 0af9e31 commit e28ea77

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

crates/cargo-gpu-build/src/build.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
//! This module provides a `rust-gpu` shader crate builder
22
//! usable inside of build scripts or as a part of CLI.
33
4-
use std::{io, process::Stdio};
4+
use std::{io, path::Path, process::Stdio};
55

66
use crate::{
77
lockfile::{LockfileMismatchError, LockfileMismatchHandler},
8+
metadata::{RustGpuMetadata, RustGpuMetadataSource},
89
spirv_builder::{CompileResult, SpirvBuilder, SpirvBuilderError},
910
spirv_cache::{
1011
backend::{
@@ -88,6 +89,15 @@ pub struct CargoGpuMetadata {
8889
pub install: CargoGpuInstallMetadata,
8990
}
9091

92+
impl RustGpuMetadata for CargoGpuMetadata {
93+
#[inline]
94+
fn patch<P>(&mut self, _shader_crate: P, _source: RustGpuMetadataSource<'_>)
95+
where
96+
P: AsRef<Path>,
97+
{
98+
}
99+
}
100+
91101
/// Parameters for [`CargoGpuBuilder::new()`].
92102
#[derive(Debug, Clone)]
93103
#[non_exhaustive]

0 commit comments

Comments
 (0)