Skip to content

Conversation

@Firestar99
Copy link
Member

@nazar-pc ashed in Rust-GPU/cargo-gpu#131 (comment):

I'd appreciate some simple [to run cargo gpu clippy and check] way through cargo-gpu-install.

So I added these shortcuts, so you can run clippy in your build script, and afterwards still build your shaders without having to clone the SpirvBuilder.

Comment on lines +679 to +684
pub fn check(&mut self) -> Result<CompileResult, SpirvBuilderError> {
self.run_cargo_cmd("check")
}

/// Shortcut for `cargo clippy`
pub fn clippy(&mut self) -> Result<CompileResult, SpirvBuilderError> {
Copy link
Member Author

@Firestar99 Firestar99 Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a huge fan how these are &mut self but build() is only &self. But I also don't want to clone the entire SpirvBuilder just to change that one property, though it probably wouldn't matter performance-wise. Suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants