Applied workspace inheritance

This commit is contained in:
Sylvester Hesp 2022-11-22 15:28:53 +01:00
parent 39850120ae
commit e7df2feb27
20 changed files with 121 additions and 92 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Changed 🛠️
- Applied workspace inheritance to Cargo.toml files
## [0.4.0-alpha.17] ## [0.4.0-alpha.17]
### Changed 🛠️ ### Changed 🛠️

View File

@ -23,6 +23,21 @@ members = [
"tests/deps-helper", "tests/deps-helper",
] ]
[workspace.package]
version = "0.4.0-alpha.17"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/EmbarkStudios/rust-gpu"
[workspace.dependencies]
spirv-std = { path = "./crates/spirv-std", version = "=0.4.0-alpha.17" }
spirv-std-types = { path = "./crates/spirv-std/shared", version = "=0.4.0-alpha.17" }
spirv-std-macros = { path = "./crates/spirv-std/macros", version = "=0.4.0-alpha.17" }
spirv-builder = { path = "./crates/spirv-builder", version = "=0.4.0-alpha.17" }
rustc_codegen_spirv = { path = "./crates/rustc_codegen_spirv", version = "=0.4.0-alpha.17", default-features = false }
rustc_codegen_spirv-types = { path = "./crates/rustc_codegen_spirv-types", version = "=0.4.0-alpha.17" }
# Enable incremental by default in release mode. # Enable incremental by default in release mode.
[profile.release] [profile.release]
incremental = true incremental = true
@ -39,8 +54,7 @@ incremental = true
codegen-units = 256 codegen-units = 256
[patch.crates-io] [patch.crates-io]
spirv-std = { path = "./crates/spirv-std" }
spirv-std-macros = { path = "./crates/spirv-std/macros" }
# HACK(eddyb) needed to include this PR (until it's part of a release): # HACK(eddyb) needed to include this PR (until it's part of a release):
# * Manishearth/compiletest-rs#249 (for `// only-*` support) # * Manishearth/compiletest-rs#249 (for `// only-*` support)
# [shesp] The commit is part of 0.8 release. We can remove this once we upgrade `compiletest`.
compiletest_rs = { git = "https://github.com/Manishearth/compiletest-rs.git", rev = "4ab843a1dc6ed9a82657d86d22397c6c5bb95b01" } compiletest_rs = { git = "https://github.com/Manishearth/compiletest-rs.git", rev = "4ab843a1dc6ed9a82657d86d22397c6c5bb95b01" }

View File

@ -1,11 +1,11 @@
[package] [package]
name = "rustc_codegen_spirv-types" name = "rustc_codegen_spirv-types"
description = "SPIR-V backend types shared between rustc_codegen_spirv and spirv-builder" description = "SPIR-V backend types shared between rustc_codegen_spirv and spirv-builder"
version = "0.4.0-alpha.17" version.workspace = true
authors = ["Embark <opensource@embark-studios.com>"] authors.workspace = true
edition = "2018" edition.workspace = true
license = "MIT OR Apache-2.0" license.workspace = true
repository = "https://github.com/EmbarkStudios/rust-gpu" repository.workspace = true
[dependencies] [dependencies]
rspirv = "0.11" rspirv = "0.11"

View File

@ -1,14 +1,11 @@
[package] [package]
name = "rustc_codegen_spirv" name = "rustc_codegen_spirv"
version = "0.4.0-alpha.17"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/EmbarkStudios/rust-gpu"
description = "SPIR-V code generator backend for rustc" description = "SPIR-V code generator backend for rustc"
#keywords = [] version.workspace = true
#categories = [] authors.workspace = true
#readme = "README.md" edition.workspace = true
license.workspace = true
repository.workspace = true
[lib] [lib]
crate-type = ["dylib"] crate-type = ["dylib"]
@ -59,7 +56,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
smallvec = { version = "1.6.1", features = ["union"] } smallvec = { version = "1.6.1", features = ["union"] }
spirv-tools = { version = "0.9", default-features = false } spirv-tools = { version = "0.9", default-features = false }
rustc_codegen_spirv-types = { path = "../rustc_codegen_spirv-types", version = "=0.4.0-alpha.17" } rustc_codegen_spirv-types.workspace = true
[dev-dependencies] [dev-dependencies]
pipe = "0.4" pipe = "0.4"

View File

@ -1,11 +1,11 @@
[package] [package]
name = "spirv-builder" name = "spirv-builder"
version = "0.4.0-alpha.17"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/EmbarkStudios/rust-gpu"
description = "Helper for building shaders with rust-gpu" description = "Helper for building shaders with rust-gpu"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
# See rustc_codegen_spirv/Cargo.toml for details on these features # See rustc_codegen_spirv/Cargo.toml for details on these features
[features] [features]
@ -16,12 +16,12 @@ skip-toolchain-check = ["rustc_codegen_spirv/skip-toolchain-check"]
watch = ["notify"] watch = ["notify"]
[dependencies] [dependencies]
rustc_codegen_spirv-types.workspace = true
# See comment in lib.rs invoke_rustc for why this is here
rustc_codegen_spirv = { workspace = true }
memchr = "2.4" memchr = "2.4"
raw-string = "0.3.5" raw-string = "0.3.5"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
rustc_codegen_spirv-types = { path = "../rustc_codegen_spirv-types", version = "=0.4.0-alpha.17" }
# See comment in lib.rs invoke_rustc for why this is here
rustc_codegen_spirv = { path = "../rustc_codegen_spirv", version = "=0.4.0-alpha.17", default-features = false }
notify = { version = "5.0.0-pre.11", optional = true } notify = { version = "5.0.0-pre.11", optional = true }

View File

@ -1,17 +1,17 @@
[package] [package]
name = "spirv-std" name = "spirv-std"
version = "0.4.0-alpha.17"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/EmbarkStudios/rust-gpu"
description = "Standard functions and types for SPIR-V" description = "Standard functions and types for SPIR-V"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[dependencies] [dependencies]
spirv-std-types.workspace = true
spirv-std-macros.workspace = true
bitflags = "1.2.1" bitflags = "1.2.1"
num-traits = { version = "0.2.14", default-features = false, features = ["libm"] } num-traits = { version = "0.2.14", default-features = false, features = ["libm"] }
spirv-std-types = { path = "./shared", version = "=0.4.0-alpha.17" }
spirv-std-macros = { path = "./macros", version = "=0.4.0-alpha.17" }
glam = { version = "0.22", default-features = false, features = ["libm"], optional = true } glam = { version = "0.22", default-features = false, features = ["libm"], optional = true }
[features] [features]

View File

@ -1,17 +1,17 @@
[package] [package]
name = "spirv-std-macros" name = "spirv-std-macros"
version = "0.4.0-alpha.17"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/EmbarkStudios/rust-gpu"
description = "Macros for spirv-std" description = "Macros for spirv-std"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[lib] [lib]
proc-macro = true proc-macro = true
[dependencies] [dependencies]
spirv-std-types = { path = "../shared", version = "=0.4.0-alpha.17" } spirv-std-types.workspace = true
proc-macro2 = "1.0.24" proc-macro2 = "1.0.24"
quote = "1.0.8" quote = "1.0.8"
syn = { version = "1.0.58", features=["full"] } syn = { version = "1.0.58", features = ["full"] }

View File

@ -1,8 +1,8 @@
[package] [package]
name = "spirv-std-types" name = "spirv-std-types"
description = "SPIR-V types shared between spirv-std and spirv-std-macros" description = "SPIR-V types shared between spirv-std and spirv-std-macros"
version = "0.4.0-alpha.17" version.workspace = true
authors = ["Embark <opensource@embark-studios.com>"] authors.workspace = true
edition = "2018" edition.workspace = true
license = "MIT OR Apache-2.0" license.workspace = true
repository = "https://github.com/EmbarkStudios/rust-gpu" repository.workspace = true

View File

@ -1,10 +1,11 @@
[package] [package]
name = "multibuilder" name = "multibuilder"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
# See rustc_codegen_spirv/Cargo.toml for details on these features # See rustc_codegen_spirv/Cargo.toml for details on these features
[features] [features]
@ -13,4 +14,4 @@ use-installed-tools = ["spirv-builder/use-installed-tools"]
use-compiled-tools = ["spirv-builder/use-compiled-tools"] use-compiled-tools = ["spirv-builder/use-compiled-tools"]
[dependencies] [dependencies]
spirv-builder = { path = "../../crates/spirv-builder", default-features = false } spirv-builder = { workspace = true, default-features = false }

View File

@ -1,10 +1,11 @@
[package] [package]
name = "example-runner-ash" name = "example-runner-ash"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
# See rustc_codegen_spirv/Cargo.toml for details on these features # See rustc_codegen_spirv/Cargo.toml for details on these features
[features] [features]
@ -19,7 +20,7 @@ winit = "0.26"
structopt = "0.3.20" structopt = "0.3.20"
cfg-if = "1.0.0" cfg-if = "1.0.0"
shared = { path = "../../shaders/shared" } shared = { path = "../../shaders/shared" }
spirv-builder = { path = "../../../crates/spirv-builder", default-features = false } spirv-builder = { workspace = true, default-features = false }
# TODO: Remove this once no longer needed, only needed to make cargo-deny happy for some reason. # TODO: Remove this once no longer needed, only needed to make cargo-deny happy for some reason.
# https://rustsec.org/advisories/RUSTSEC-2021-0119 # https://rustsec.org/advisories/RUSTSEC-2021-0119

View File

@ -1,10 +1,11 @@
[package] [package]
name = "example-runner-wgpu" name = "example-runner-wgpu"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[lib] [lib]
crate-type = ["lib", "cdylib"] crate-type = ["lib", "cdylib"]
@ -27,7 +28,7 @@ strum = { version = "0.23.0", default_features = false, features = ["std", "deri
bytemuck = "1.6.3" bytemuck = "1.6.3"
[target.'cfg(not(any(target_os = "android", target_arch = "wasm32")))'.dependencies] [target.'cfg(not(any(target_os = "android", target_arch = "wasm32")))'.dependencies]
spirv-builder = { path = "../../../crates/spirv-builder", default-features = false, features = ["watch"] } spirv-builder = { workspace = true, default-features = false, features = ["watch"] }
[target.'cfg(target_os = "android")'.dependencies] [target.'cfg(target_os = "android")'.dependencies]
ndk-glue = "0.4" ndk-glue = "0.4"

View File

@ -1,10 +1,11 @@
[package] [package]
name = "example-runner-wgpu-builder" name = "example-runner-wgpu-builder"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
# See rustc_codegen_spirv/Cargo.toml for details on these features # See rustc_codegen_spirv/Cargo.toml for details on these features
[features] [features]
@ -13,4 +14,4 @@ use-installed-tools = ["spirv-builder/use-installed-tools"]
use-compiled-tools = ["spirv-builder/use-compiled-tools"] use-compiled-tools = ["spirv-builder/use-compiled-tools"]
[dependencies] [dependencies]
spirv-builder = { path = "../../../../crates/spirv-builder", default-features = false } spirv-builder = { workspace = true, default-features = false }

View File

@ -1,16 +1,17 @@
[package] [package]
name = "compute-shader" name = "compute-shader"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[lib] [lib]
crate-type = ["dylib", "lib"] crate-type = ["dylib", "lib"]
[dependencies] [dependencies]
spirv-std = { path = "../../../crates/spirv-std", features = ["glam"] } spirv-std = { workspace = true, features = ["glam"] }
[target.'cfg(not(target_arch = "spirv"))'.dependencies] [target.'cfg(not(target_arch = "spirv"))'.dependencies]
rayon = "1.5" rayon = "1.5"

View File

@ -1,14 +1,15 @@
[package] [package]
name = "mouse-shader" name = "mouse-shader"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[lib] [lib]
crate-type = ["dylib"] crate-type = ["dylib"]
[dependencies] [dependencies]
shared = { path = "../../shaders/shared" } shared = { path = "../../shaders/shared" }
spirv-std = { path = "../../../crates/spirv-std", features = ["glam"] } spirv-std = { workspace = true, features = ["glam"] }

View File

@ -1,13 +1,14 @@
[package] [package]
name = "reduce" name = "reduce"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[lib] [lib]
crate-type = ["dylib", "lib"] crate-type = ["dylib", "lib"]
[dependencies] [dependencies]
spirv-std = { path = "../../../crates/spirv-std", features = ["glam"] } spirv-std = { workspace = true, features = ["glam"] }

View File

@ -1,11 +1,12 @@
[package] [package]
name = "shared" name = "shared"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[dependencies] [dependencies]
spirv-std = { path = "../../../crates/spirv-std", features = ["glam"] } spirv-std = { workspace = true, features = ["glam"] }
bytemuck = { version = "1.6.3", features = ["derive"] } bytemuck = { version = "1.6.3", features = ["derive"] }

View File

@ -1,14 +1,15 @@
[package] [package]
name = "simplest-shader" name = "simplest-shader"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[lib] [lib]
crate-type = ["dylib"] crate-type = ["dylib"]
[dependencies] [dependencies]
spirv-std = { path = "../../../crates/spirv-std", features = ["glam"] } spirv-std = { workspace = true, features = ["glam"] }
shared = { path = "../shared" } shared = { path = "../shared" }

View File

@ -1,14 +1,15 @@
[package] [package]
name = "sky-shader" name = "sky-shader"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[lib] [lib]
crate-type = ["lib", "dylib"] crate-type = ["lib", "dylib"]
[dependencies] [dependencies]
shared = { path = "../../shaders/shared" } shared = { path = "../../shaders/shared" }
spirv-std = { path = "../../../crates/spirv-std", features = ["glam"] } spirv-std = { workspace = true, features = ["glam"] }

View File

@ -1,10 +1,11 @@
[package] [package]
name = "compiletests" name = "compiletests"
version = "0.0.0" version = "0.0.0"
authors = ["Embark <opensource@embark-studios.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
# See rustc_codegen_spirv/Cargo.toml for details on these features # See rustc_codegen_spirv/Cargo.toml for details on these features
[features] [features]
@ -14,5 +15,5 @@ use-compiled-tools = ["rustc_codegen_spirv/use-compiled-tools"]
[dependencies] [dependencies]
compiletest = { version = "0.7.0", package = "compiletest_rs" } compiletest = { version = "0.7.0", package = "compiletest_rs" }
rustc_codegen_spirv = { path = "../crates/rustc_codegen_spirv", version = "=0.4.0-alpha.17", default-features = false } rustc_codegen_spirv = { workspace = true }
structopt = "0.3.21" structopt = "0.3.21"

View File

@ -1,11 +1,12 @@
[package] [package]
name = "compiletests-deps-helper" name = "compiletests-deps-helper"
version = "0.0.0"
description = "Shared dependencies of all the compiletest tests" description = "Shared dependencies of all the compiletest tests"
authors = ["Embark <opensource@embark-studios.com>"] version = "0.0.0"
edition = "2018"
license = "MIT OR Apache-2.0"
publish = false publish = false
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
[dependencies] [dependencies]
spirv-std = { path = "../../crates/spirv-std", features = ["glam"] } spirv-std = { workspace = true, features = ["glam"] }