This repository was archived by the owner on Apr 15, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ impl Config {
3131 ) -> anyhow:: Result < crate :: build:: Build > {
3232 let mut config = metadata. as_json ( shader_crate_path) ?;
3333
34- env_args. retain ( |arg| !( arg == "build" || arg == "install" || arg == "clippy" ) ) ;
34+ env_args. retain ( |arg| {
35+ !( arg == "build" || arg == "install" || arg == "check" || arg == "clippy" )
36+ } ) ;
3537 let cli_args_json = Self :: cli_args_to_json ( env_args) ?;
3638 Self :: json_merge ( & mut config, cli_args_json, None ) ?;
3739
Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ pub enum Command {
105105 /// Compile a shader crate to SPIR-V.
106106 Build ( Box < Build > ) ,
107107
108+ /// Run `cargo check` on the shader crate with a SPIR-V target without building the actual shaders
109+ Check ( Box < Build > ) ,
110+
108111 /// Run clippy on a shader crate with a SPIR-V target
109112 Clippy ( Box < Build > ) ,
110113
@@ -143,16 +146,23 @@ impl Command {
143146 ) ;
144147 command. install . run ( ) ?;
145148 }
146- Self :: Build ( build) | Self :: Clippy ( build) => {
149+ Self :: Build ( build) | Self :: Check ( build ) | Self :: Clippy ( build) => {
147150 let shader_crate_path = & build. install . shader_crate ;
148151 let mut command = config:: Config :: clap_command_with_cargo_config (
149152 shader_crate_path,
150153 env_args,
151154 metadata_cache,
152155 ) ?;
153- if let Self :: Clippy ( _) = self {
154- command. build . spirv_builder . cargo_cmd = Some ( "clippy" . into ( ) ) ;
155- command. build . allow_no_artifacts = true ;
156+ match self {
157+ Command :: Check ( _) => {
158+ command. build . spirv_builder . cargo_cmd = Some ( "check" . into ( ) ) ;
159+ command. build . allow_no_artifacts = true ;
160+ }
161+ Command :: Clippy ( _) => {
162+ command. build . spirv_builder . cargo_cmd = Some ( "clippy" . into ( ) ) ;
163+ command. build . allow_no_artifacts = true ;
164+ }
165+ _ => { }
156166 }
157167 log:: debug!( "building with final merged arguments: {command:#?}" ) ;
158168
You can’t perform that action at this time.
0 commit comments