From 74d7f2b22c4ca570e108f57db5d76cad72dd73bb Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 21 Jul 2024 16:07:33 -0400 Subject: [PATCH] use `workspace.dependencies` for common dependency versions --- Cargo.toml | 7 +++++++ examples/audio_playback/Cargo.toml | 2 +- examples/balls/Cargo.toml | 2 +- examples/balls_v2/Cargo.toml | 2 +- examples/imgui_integration/Cargo.toml | 8 ++++---- examples/slimed/Cargo.toml | 6 +++--- examples/template_complicated/Cargo.toml | 2 +- examples/template_minimal/Cargo.toml | 2 +- ggdt/Cargo.toml | 8 ++++---- ggdt_imgui/Cargo.toml | 4 ++-- 10 files changed, 25 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 191cdb4..e9ab402 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,13 @@ members = [ ] resolver = "2" +[workspace.dependencies] +anyhow = "=1.0.75" +imgui = { version = "0.11.0", features = ["docking"] } +serde = { version = "1.0.192", features = ["derive"] } +serde_json = "1.0.108" +thiserror = "=1.0.50" + # some stuff is becoming noticably slow with default dev profile settings (opt-level = 0). especially any of the # fancier triangle_2d drawing stuff. while there are many optimizations still left to be made, it seems like a good # compromise on build time vs optimizations to keep opt-level at 1 while actively developing. diff --git a/examples/audio_playback/Cargo.toml b/examples/audio_playback/Cargo.toml index 89f989e..d6cc1eb 100644 --- a/examples/audio_playback/Cargo.toml +++ b/examples/audio_playback/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "=1.0.75" +anyhow.workspace = true ggdt = { path = "../../ggdt" } diff --git a/examples/balls/Cargo.toml b/examples/balls/Cargo.toml index 66cd525..0a41358 100644 --- a/examples/balls/Cargo.toml +++ b/examples/balls/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "=1.0.75" +anyhow.workspace = true ggdt = { path = "../../ggdt" } diff --git a/examples/balls_v2/Cargo.toml b/examples/balls_v2/Cargo.toml index da850b7..feff490 100644 --- a/examples/balls_v2/Cargo.toml +++ b/examples/balls_v2/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "=1.0.75" +anyhow.workspace = true ggdt = { path = "../../ggdt", features = [] } diff --git a/examples/imgui_integration/Cargo.toml b/examples/imgui_integration/Cargo.toml index 75f1b54..b09fe5d 100644 --- a/examples/imgui_integration/Cargo.toml +++ b/examples/imgui_integration/Cargo.toml @@ -4,9 +4,9 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "=1.0.75" +anyhow.workspace = true ggdt = { path = "../../ggdt" } ggdt_imgui = { path = "../../ggdt_imgui" } -imgui = "0.11.0" -serde = { version = "1.0.136", features = ["derive"] } -serde_json = "1.0.79" +imgui.workspace = true +serde.workspace = true +serde_json.workspace = true diff --git a/examples/slimed/Cargo.toml b/examples/slimed/Cargo.toml index e236630..6913b42 100644 --- a/examples/slimed/Cargo.toml +++ b/examples/slimed/Cargo.toml @@ -4,8 +4,8 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "=1.0.75" +anyhow.workspace = true ggdt = { path = "../../ggdt", features = [] } -serde = { version = "1.0.136", features = ["derive"] } -serde_json = "1.0.79" +serde.workspace = true +serde_json.workspace = true diff --git a/examples/template_complicated/Cargo.toml b/examples/template_complicated/Cargo.toml index c69fa74..5a41ef4 100644 --- a/examples/template_complicated/Cargo.toml +++ b/examples/template_complicated/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "=1.0.75" +anyhow.workspace = true ggdt = { path = "../../ggdt" } diff --git a/examples/template_minimal/Cargo.toml b/examples/template_minimal/Cargo.toml index f509d06..a828310 100644 --- a/examples/template_minimal/Cargo.toml +++ b/examples/template_minimal/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "=1.0.75" +anyhow.workspace = true ggdt = { path = "../../ggdt" } diff --git a/ggdt/Cargo.toml b/ggdt/Cargo.toml index 65a00bc..673c2d4 100644 --- a/ggdt/Cargo.toml +++ b/ggdt/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] byte-slice-cast = "1.2.2" byteorder = "1.5.0" -thiserror = "=1.0.50" +thiserror.workspace = true rand = "0.8.5" num = "0.4.1" num-derive = "0.4.1" @@ -16,8 +16,8 @@ num-traits = "0.2.17" bitflags = "2.4.1" flate2 = "=1.0.27" crc32fast = "1.3.2" -serde = { version = "1.0.192", features = ["derive"] } -serde_json = "1.0.108" +serde.workspace = true +serde_json.workspace = true [target.'cfg(not(windows))'.dependencies] sdl2 = { git = "https://github.com/Rust-SDL2/rust-sdl2/", rev = "819ab438ac971a922d6ee1da558822002d343b4e", features = ["static-link", "bundled", "use-pkgconfig", "unsafe_textures"] } @@ -28,7 +28,7 @@ sdl2 = { git = "https://github.com/Rust-SDL2/rust-sdl2/", rev = "819ab438ac971a9 [dev-dependencies] claim = "0.5.0" criterion = "0.5.1" -anyhow = "=1.0.75" +anyhow.workspace = true tempfile = "3.8.1" [[bench]] diff --git a/ggdt_imgui/Cargo.toml b/ggdt_imgui/Cargo.toml index 81d1209..c0dc7e4 100644 --- a/ggdt_imgui/Cargo.toml +++ b/ggdt_imgui/Cargo.toml @@ -9,5 +9,5 @@ edition = "2021" [dependencies] ggdt = { path = "../ggdt" } -imgui = { version = "0.11.0", features = ["docking"] } -thiserror = "=1.0.50" +imgui.workspace = true +thiserror.workspace = true