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
# run: pip install ninja
- uses: actions/checkout@v3
- name: Build
- name: Build tests
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build examples
run: |
cd examples
cargo build --verbose
linux_stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
- name: Build tests
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build examples
run: |
cd examples
cargo build --verbose
macos_stable:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Build
- name: Build tests
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build examples
run: |
cd examples
cargo build --verbose

2
.gitignore vendored
View File

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

View File

@ -1,6 +1,5 @@
[workspace]
members = [
"examples/*",
"vulkano",
"vulkano-macros",
"vulkano-shaders",
@ -8,3 +7,52 @@ members = [
"vulkano-win",
]
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"
[dependencies]
cgmath = "0.18"
rand = "0.8"
vulkano = { path = "../../vulkano" }
vulkano-shaders = { path = "../../vulkano-shaders" }
winit = "0.28"
cgmath = { workspace = true }
rand = { workspace = true }
vulkano = { workspace = true }
vulkano-shaders = { workspace = true }
winit = { workspace = true }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,9 +10,9 @@ path = "main.rs"
[dependencies]
# 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.
vulkano-shaders = { path = "../../vulkano-shaders" }
vulkano-shaders = { workspace = true }
# 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.
winit = "0.28"
winit = { workspace = true }

View File

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

View File

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

View File

@ -13,6 +13,6 @@ categories = ["rendering::graphics-api"]
readme = "../README.md"
[dependencies]
ahash = "0.8"
vulkano = { version = "0.34.0", path = "../vulkano", default-features = false }
winit = { version = "0.28" }
ahash = { workspace = true }
vulkano = { workspace = true }
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"]
# NOTE(Marc): The dependencies here are not workspace dependencies because vulkano-win is
# deprecated and won't be receiving updates.
[dependencies]
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 }
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]

View File

@ -14,41 +14,39 @@ readme = "../README.md"
build = "build.rs"
[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 = { version = "1.9", features = ["min_const_generics"] }
crossbeam-queue = "0.3"
half = { version = "2", features = ["bytemuck"] }
libloading = "0.8"
once_cell = "1.17"
parking_lot = { version = "0.12", features = ["send_guard"] }
raw-window-handle = "0.5"
serde = { version = "1.0", optional = true }
smallvec = "1.8"
thread_local = "1.1"
vulkano-macros = { path = "../vulkano-macros", version = "0.34.0", optional = true }
ahash = { workspace = true }
ash = { workspace = true }
bytemuck = { workspace = true, features = ["min_const_generics"] }
crossbeam-queue = { workspace = true }
half = { workspace = true, features = ["bytemuck"] }
libloading = { workspace = true }
once_cell = { workspace = true }
parking_lot = { workspace = true, features = ["send_guard"] }
raw-window-handle = { workspace = true }
serde = { workspace = true, optional = true }
smallvec = { workspace = true }
thread_local = { workspace = true }
vulkano-macros = { workspace = true, optional = true }
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
objc = "0.2.5"
core-graphics-types = "0.1"
objc = { workspace = true }
core-graphics-types = { workspace = true }
[build-dependencies]
ahash = "0.8"
heck = "0.4"
indexmap = "2.0"
once_cell = "1.16"
proc-macro2 = "1.0"
quote = "1.0"
regex = "1.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
vk-parse = "0.12"
ahash = { workspace = true }
heck = { workspace = true }
indexmap = { workspace = true }
once_cell = { workspace = true }
proc-macro2 = { workspace = true }
quote = { workspace = true }
regex = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
vk-parse = { workspace = true }
[dev-dependencies]
cgmath = "0.18"
nalgebra = "0.32"
cgmath = { workspace = true }
nalgebra = { workspace = true }
[features]
default = ["macros"]