Workspace dependencies (#2381)

* Use workspace dependencies

* Update CI workflow to account for the two workspaces

* Make the tables in the root workspace a bit nicer to look at

* Use workspace package version

* Remove workspace package version

* Make winit a workspace dependency as well
This commit is contained in:
marc0246 2023-10-30 04:42:00 +01:00 committed by GitHub
parent 9f47346263
commit 1e9128795f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 240 additions and 164 deletions

View File

@ -19,23 +19,35 @@ jobs:
# - name: Ninja Install # - name: Ninja Install
# run: pip install ninja # run: pip install ninja
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Build - name: Build tests
run: cargo build --verbose run: cargo build --verbose
- name: Run tests - name: Run tests
run: cargo test --verbose run: cargo test --verbose
- name: Build examples
run: |
cd examples
cargo build --verbose
linux_stable: linux_stable:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Build - name: Build tests
run: cargo build --verbose run: cargo build --verbose
- name: Run tests - name: Run tests
run: cargo test --verbose run: cargo test --verbose
- name: Build examples
run: |
cd examples
cargo build --verbose
macos_stable: macos_stable:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Build - name: Build tests
run: cargo build --verbose run: cargo build --verbose
- name: Run tests - name: Run tests
run: cargo test --verbose run: cargo test --verbose
- name: Build examples
run: |
cd examples
cargo build --verbose

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
target target
/Cargo.lock Cargo.lock
.cargo .cargo
examples/dynamic-local-size/mandelbrot.png examples/dynamic-local-size/mandelbrot.png
examples/msaa-renderpass/triangle.png examples/msaa-renderpass/triangle.png

View File

@ -1,6 +1,5 @@
[workspace] [workspace]
members = [ members = [
"examples/*",
"vulkano", "vulkano",
"vulkano-macros", "vulkano-macros",
"vulkano-shaders", "vulkano-shaders",
@ -8,3 +7,52 @@ members = [
"vulkano-win", "vulkano-win",
] ]
resolver = "2" resolver = "2"
[workspace.dependencies.vulkano]
version = "0.34"
path = "vulkano"
default-features = false
[workspace.dependencies.vulkano-macros]
version = "0.34"
path = "vulkano-macros"
[workspace.dependencies.vulkano-shaders]
version = "0.34"
path = "vulkano-shaders"
[workspace.dependencies.vulkano-util]
version = "0.34"
path = "vulkano-util"
[workspace.dependencies]
ahash = "0.8"
# When updating Ash, also update vk.xml to the same Vulkan patch version that Ash uses.
# All versions of vk.xml can be found at:
# https://github.com/KhronosGroup/Vulkan-Headers/commits/main/registry/vk.xml
ash = "0.37.3"
bytemuck = "1.9"
cgmath = "0.18"
core-graphics-types = "0.1"
crossbeam-queue = "0.3"
half = "2.0"
heck = "0.4"
indexmap = "2.0"
libloading = "0.8"
objc = "0.2.5"
once_cell = "1.17"
nalgebra = "0.32"
parking_lot = "0.12"
proc-macro2 = "1.0"
proc-macro-crate = "1.2"
quote = "1.0"
raw-window-handle = "0.5"
regex = "1.8"
serde = "1.0"
serde_json = "1.0"
shaderc = "0.8"
smallvec = "1.8"
syn = "1.0"
thread_local = "1.1"
vk-parse = "0.12"
winit = "0.28"

15
examples/Cargo.toml Normal file
View File

@ -0,0 +1,15 @@
[workspace]
members = ["*"]
resolver = "2"
[workspace.dependencies]
cgmath = "0.18"
png = "0.17"
rand = "0.8"
ron = "0.8"
serde = "1.0"
vulkano = { path = "../vulkano" }
vulkano-macros = { path = "../vulkano-macros" }
vulkano-shaders = { path = "../vulkano-shaders" }
vulkano-util = { path = "../vulkano-util" }
winit = "0.28"

View File

@ -9,8 +9,8 @@ name = "async-update"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
cgmath = "0.18" cgmath = { workspace = true }
rand = "0.8" rand = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "basic-compute-shader"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "buffer-allocator"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "clear-attachments"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,4 +9,4 @@ name = "debug"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }

View File

@ -9,7 +9,7 @@ name = "deferred"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
cgmath = "0.18" cgmath = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "dynamic-buffers"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "dynamic-local-size"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
png = "0.17" png = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -10,8 +10,8 @@ path = "main.rs"
[dependencies] [dependencies]
glium = "0.32.1" glium = "0.32.1"
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }
# Glium has still not been updated to the latest winit version # Glium has still not been updated to the latest winit version
winit_glium = { package = "winit", version = "0.27.1" } winit_glium = { package = "winit", version = "0.27.1" }

View File

@ -9,7 +9,7 @@ name = "image-self-copy-blit"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
png = "0.17" png = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,7 +9,7 @@ name = "image"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
png = "0.17" png = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,7 +9,7 @@ name = "immutable-sampler"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
png = "0.17" png = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "indirect"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "instancing"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,9 +9,9 @@ name = "interactive-fractal"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
cgmath = "0.18" cgmath = { workspace = true }
rand = "0.8" rand = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
vulkano-util = { path = "../../vulkano-util" } vulkano-util = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "msaa-renderpass"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
png = "0.17" png = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,9 +9,9 @@ name = "multi-window-game-of-life"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
cgmath = "0.18" cgmath = { workspace = true }
rand = "0.8" rand = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
vulkano-util = { path = "../../vulkano-util" } vulkano-util = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "multi-window"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "multiview"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
png = "0.17" png = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "occlusion-query"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "pipeline-caching"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "push-constants"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,7 +9,7 @@ name = "push-descriptors"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
png = "0.17" png = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,7 +9,7 @@ name = "runtime-array"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
png = "0.17" png = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "runtime-shader"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "self-copy-buffer"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "shader-include"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,8 +9,8 @@ name = "shader-types-derive"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
ron = "0.8" ron = { workspace = true }
serde = { version = "1.0", features = ["derive"] } serde = { workspace = true, features = ["derive"] }
vulkano = { path = "../../vulkano", features = ["serde"] } vulkano = { workspace = true, features = ["serde"] }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "shader-types-sharing"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "simple-particles"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,5 +9,5 @@ name = "specialization-constants"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }

View File

@ -9,7 +9,7 @@ name = "teapot"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
cgmath = "0.18" cgmath = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "tessellation"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,7 +9,7 @@ name = "texture-array"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
png = "0.17" png = { workspace = true }
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -9,6 +9,6 @@ name = "triangle-v1_3"
path = "main.rs" path = "main.rs"
[dependencies] [dependencies]
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
winit = "0.28" winit = { workspace = true }

View File

@ -10,9 +10,9 @@ path = "main.rs"
[dependencies] [dependencies]
# The `vulkano` crate is the main crate that you must use to use Vulkan. # The `vulkano` crate is the main crate that you must use to use Vulkan.
vulkano = { path = "../../vulkano" } vulkano = { workspace = true }
# Provides the `shader!` macro that is used to generate code for using shaders. # Provides the `shader!` macro that is used to generate code for using shaders.
vulkano-shaders = { path = "../../vulkano-shaders" } vulkano-shaders = { workspace = true }
# The Vulkan library doesn't provide any functionality to create and handle windows, as # The Vulkan library doesn't provide any functionality to create and handle windows, as
# this would be out of scope. In order to open a window, we are going to use the `winit` crate. # this would be out of scope. In order to open a window, we are going to use the `winit` crate.
winit = "0.28" winit = { workspace = true }

View File

@ -16,10 +16,10 @@ readme = "../README.md"
proc-macro = true proc-macro = true
[dependencies] [dependencies]
syn = "1.0" syn = { workspace = true }
quote = "1.0" quote = { workspace = true }
proc-macro2 = "1.0" proc-macro2 = { workspace = true }
proc-macro-crate = "1.2" proc-macro-crate = { workspace = true }
[dev-dependencies] [dev-dependencies]
vulkano = { path = "../vulkano" } vulkano = { workspace = true }

View File

@ -16,13 +16,13 @@ readme = "../README.md"
proc-macro = true proc-macro = true
[dependencies] [dependencies]
ahash = "0.8" ahash = { workspace = true }
heck = "0.4" heck = { workspace = true }
proc-macro2 = "1.0" proc-macro2 = { workspace = true }
quote = "1.0" quote = { workspace = true }
shaderc = "0.8" shaderc = { workspace = true }
syn = { version = "2.0", features = ["full", "extra-traits"] } syn = { workspace = true, features = ["full", "extra-traits"] }
vulkano = { version = "0.34.0", path = "../vulkano", default-features = false } vulkano = { workspace = true }
[features] [features]
shaderc-build-from-source = ["shaderc/build-from-source"] shaderc-build-from-source = ["shaderc/build-from-source"]

View File

@ -13,6 +13,6 @@ categories = ["rendering::graphics-api"]
readme = "../README.md" readme = "../README.md"
[dependencies] [dependencies]
ahash = "0.8" ahash = { workspace = true }
vulkano = { version = "0.34.0", path = "../vulkano", default-features = false } vulkano = { workspace = true }
winit = { version = "0.28" } winit = { workspace = true }

View File

@ -19,9 +19,12 @@ raw-window-handle_ = ["dep:raw-window-handle"]
winit = ["dep:winit", "dep:objc", "dep:core-graphics-types"] winit = ["dep:winit", "dep:objc", "dep:core-graphics-types"]
winit_ = ["dep:winit", "dep:objc", "dep:core-graphics-types"] winit_ = ["dep:winit", "dep:objc", "dep:core-graphics-types"]
# NOTE(Marc): The dependencies here are not workspace dependencies because vulkano-win is
# deprecated and won't be receiving updates.
[dependencies] [dependencies]
raw-window-handle = { version = "0.5", optional = true } raw-window-handle = { version = "0.5", optional = true }
vulkano = { version = "0.34.0", path = "../vulkano", default-features = false } vulkano = { workspace = true }
winit = { version = "0.28", optional = true } winit = { version = "0.28", optional = true }
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]

View File

@ -14,41 +14,39 @@ readme = "../README.md"
build = "build.rs" build = "build.rs"
[dependencies] [dependencies]
ahash = "0.8" ahash = { workspace = true }
# When updating Ash, also update vk.xml to the same Vulkan patch version that Ash uses. ash = { workspace = true }
# All versions of vk.xml can be found at https://github.com/KhronosGroup/Vulkan-Headers/commits/main/registry/vk.xml. bytemuck = { workspace = true, features = ["min_const_generics"] }
ash = "^0.37.3" crossbeam-queue = { workspace = true }
bytemuck = { version = "1.9", features = ["min_const_generics"] } half = { workspace = true, features = ["bytemuck"] }
crossbeam-queue = "0.3" libloading = { workspace = true }
half = { version = "2", features = ["bytemuck"] } once_cell = { workspace = true }
libloading = "0.8" parking_lot = { workspace = true, features = ["send_guard"] }
once_cell = "1.17" raw-window-handle = { workspace = true }
parking_lot = { version = "0.12", features = ["send_guard"] } serde = { workspace = true, optional = true }
raw-window-handle = "0.5" smallvec = { workspace = true }
serde = { version = "1.0", optional = true } thread_local = { workspace = true }
smallvec = "1.8" vulkano-macros = { workspace = true, optional = true }
thread_local = "1.1"
vulkano-macros = { path = "../vulkano-macros", version = "0.34.0", optional = true }
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
objc = "0.2.5" objc = { workspace = true }
core-graphics-types = "0.1" core-graphics-types = { workspace = true }
[build-dependencies] [build-dependencies]
ahash = "0.8" ahash = { workspace = true }
heck = "0.4" heck = { workspace = true }
indexmap = "2.0" indexmap = { workspace = true }
once_cell = "1.16" once_cell = { workspace = true }
proc-macro2 = "1.0" proc-macro2 = { workspace = true }
quote = "1.0" quote = { workspace = true }
regex = "1.8" regex = { workspace = true }
serde = { version = "1.0", features = ["derive"] } serde = { workspace = true, features = ["derive"] }
serde_json = "1.0" serde_json = { workspace = true }
vk-parse = "0.12" vk-parse = { workspace = true }
[dev-dependencies] [dev-dependencies]
cgmath = "0.18" cgmath = { workspace = true }
nalgebra = "0.32" nalgebra = { workspace = true }
[features] [features]
default = ["macros"] default = ["macros"]