Skip to content

Commit

Permalink
Update clap (replacing structopt) (#1114)
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall authored Jan 10, 2024
1 parent baab3f6 commit d0e3749
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 124 deletions.
193 changes: 96 additions & 97 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion examples/runners/ash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ash = "0.37"
ash-window = "0.12"
raw-window-handle = "0.5.1"
winit = { version = "0.29.0", features = ["rwh_05"] }
structopt = "0.3.20"
clap = { version = "4", features = ["derive"] }
cfg-if = "1.0.0"
shared = { path = "../../shaders/shared" }
spirv-builder = { workspace = true, default-features = false }
Expand Down
10 changes: 5 additions & 5 deletions examples/runners/ash/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,22 @@ use std::{
thread,
};

use structopt::StructOpt;
use clap::Parser;

use spirv_builder::{MetadataPrintout, SpirvBuilder};

use shared::ShaderConstants;

#[derive(Debug, StructOpt)]
#[structopt()]
#[derive(Debug, Parser)]
#[command()]
pub struct Options {
/// Use Vulkan debug layer (requires Vulkan SDK installed)
#[structopt(short, long)]
#[arg(short, long)]
debug_layer: bool,
}

pub fn main() {
let options = Options::from_args();
let options = Options::parse();
let shaders = compile_shaders();

// runtime setup
Expand Down
2 changes: 1 addition & 1 deletion examples/runners/wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ futures = { version = "0.3", default-features = false, features = ["std", "execu
# Vulkan SDK or MoltenVK needs to be installed for `vulkan-portability` to work on macOS
wgpu = { version = "0.18.0", features = ["spirv", "vulkan-portability"] }
winit = { version = "0.29.0", features = ["android-native-activity", "rwh_05"] }
structopt = "0.3"
clap = { version = "4", features = ["derive"] }
strum = { version = "0.23.0", default_features = false, features = ["std", "derive"] }
bytemuck = "1.6.3"

Expand Down
Loading

0 comments on commit d0e3749

Please sign in to comment.