Skip to content

Commit

Permalink
Merge pull request #30 from tombh/panic-less-code
Browse files Browse the repository at this point in the history
Panic-less code and user prompt for toolchain installation
  • Loading branch information
schell authored Dec 21, 2024
2 parents 35c2132 + 9dc0c03 commit c34e883
Show file tree
Hide file tree
Showing 14 changed files with 601 additions and 260 deletions.
158 changes: 158 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ exclude = [
resolver = "2"

[workspace.dependencies]
anyhow = "1.0.94"
clap = { version = "4.4.8", features = ["derive"] }
chrono = { version = "0.4.38", default-features = false }
chrono = { version = "0.4.38", default-features = false, features = ["std"] }
crossterm = "0.28.1"
directories = "5.0.1"
env_home = "0.1.0"
env_logger = "0.10"
Expand Down Expand Up @@ -48,12 +50,6 @@ multiple_crate_versions = { level = "allow", priority = 1 }
pub_with_shorthand = { level = "allow", priority = 1 }
partial_pub_fields = { level = "allow", priority = 1 }
pattern_type_mismatch = { level = "allow", priority = 1 }
print_stdout = { level = "allow", priority = 1 }
std_instead_of_alloc = { level = "allow", priority = 1 }

# TODO: Try to not depend on allowing these lints
unwrap_used = { level = "allow", priority = 1 }
get_unwrap = { level = "allow", priority = 1 }
expect_used = { level = "allow", priority = 1 }
panic = { level = "allow", priority = 1 }

45 changes: 41 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ Options:
--force-spirv-cli-rebuild
Force `spirv-builder-cli` and `rustc_codegen_spirv` to be rebuilt
--auto-install-rust-toolchain
Assume "yes" to "Install Rust toolchain: [y/n]" prompt
-h, --help
Print help (see a summary with '-h')
Expand Down Expand Up @@ -134,6 +137,9 @@ Options:
--force-spirv-cli-rebuild
Force `spirv-builder-cli` and `rustc_codegen_spirv` to be rebuilt
--auto-install-rust-toolchain
Assume "yes" to "Install Rust toolchain: [y/n]" prompt
--shader-target <SHADER_TARGET>
Shader target
Expand Down Expand Up @@ -197,13 +203,44 @@ Options:
Show some useful values
Usage: cargo-gpu show [OPTIONS]
Usage: cargo-gpu show <COMMAND>
Options:
--cache-directory
Displays the location of the cache directory
Commands:
cache-directory Displays the location of the cache directory
spirv-source The source location of spirv-std
help Print this message or the help of the given subcommand(s)
Options:
-h, --help
Print help
* Cache-directory
Displays the location of the cache directory
Usage: cargo-gpu show cache-directory
Options:
-h, --help
Print help
* Spirv-source
The source location of spirv-std
Usage: cargo-gpu show spirv-source [OPTIONS]
Options:
--shader-crate <SHADER_CRATE>
The location of the shader-crate to inspect to determine its spirv-std dependency
[default: ./]
-h, --help
Print help
````
2 changes: 2 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
allow-unwrap-in-tests = true
allow-panic-in-tests = true
2 changes: 2 additions & 0 deletions crates/cargo-gpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ keywords = ["gpu", "compiler"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow.workspace = true
spirv-builder-cli = { path = "../spirv-builder-cli", default-features = false }
clap.workspace = true
directories.workspace = true
Expand All @@ -20,6 +21,7 @@ serde_json.workspace = true
toml.workspace = true
chrono.workspace = true
http.workspace = true
crossterm.workspace = true

[dev-dependencies]
test-log.workspace = true
Expand Down
Loading

0 comments on commit c34e883

Please sign in to comment.