pack: add librashader-pack

also consolidate rayon dependency
This commit is contained in:
chyyran 2024-10-01 00:34:36 -04:00 committed by Ronny Chan
parent f14f45b3b1
commit 4273a833e8
12 changed files with 59 additions and 16 deletions

14
Cargo.lock generated
View file

@ -1624,6 +1624,20 @@ dependencies = [
"windows 0.58.0", "windows 0.58.0",
] ]
[[package]]
name = "librashader-pack"
version = "0.4.5"
dependencies = [
"image",
"librashader-preprocess",
"librashader-presets",
"librashader-reflect",
"rayon",
"serde",
"serde_json",
"thiserror",
]
[[package]] [[package]]
name = "librashader-preprocess" name = "librashader-preprocess"
version = "0.4.5" version = "0.4.5"

View file

@ -16,7 +16,7 @@ members = [
"librashader-cache", "librashader-cache",
"librashader-capi", "librashader-capi",
"librashader-build-script", "librashader-build-script",
"librashader-cli"] "librashader-cli", "librashader-pack"]
resolver = "2" resolver = "2"
[workspace.dependencies] [workspace.dependencies]
@ -32,6 +32,17 @@ wgpu = { version = "22", default-features = false }
wgpu-types = { version = "22" } wgpu-types = { version = "22" }
clap = { version = "=4.3.0", features = ["derive"] } clap = { version = "=4.3.0", features = ["derive"] }
rayon = { version = "1.10.0"}
[workspace.dependencies.image]
version = "0.25.2"
features = [
"gif", "jpeg", "png",
"tga", "pnm", "tiff",
"webp", "bmp", "dds",
]
default-features = false
[workspace.metadata.release] [workspace.metadata.release]

View file

@ -17,7 +17,7 @@ librashader-runtime = { version = "0.4.5", path = "../librashader-runtime"}
wgpu = { version = "22", default-features = false, optional = true } wgpu = { version = "22", default-features = false, optional = true }
wgpu-types = { version = "22", optional = true } wgpu-types = { version = "22", optional = true }
anyhow = "1.0.86" anyhow = "1.0.86"
image = { version = "0.25.2", default-features = false, features = ["png"] } image = { workspace = true }
gfx-maths = "0.2.8" gfx-maths = "0.2.8"
pollster = "0.3.0" pollster = "0.3.0"

View file

@ -0,0 +1,21 @@
[package]
name = "librashader-pack"
version = "0.4.5"
edition = "2021"
[dependencies]
librashader-presets = { path = "../librashader-presets", version = "0.4.5", features = ["serde"] }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.4.5", features = ["serde"] }
librashader-reflect= { path = "../librashader-reflect", version = "0.4.5" }
thiserror = "1.0.64"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.128"
rayon = { workspace = true }
image = { workspace = true}
[features]
parse_legacy_glsl = ["librashader-presets/parse_legacy_glsl"]
[target.'cfg(not(target_arch="wasm32"))'.dependencies]
rayon = { workspace = true}

View file

@ -0,0 +1 @@

View file

@ -21,9 +21,10 @@ librashader-cache = { path = "../librashader-cache", version = "0.4.5", features
thiserror = "1.0.37" thiserror = "1.0.37"
bytemuck = "1.12.3" bytemuck = "1.12.3"
rayon = "1.6.1"
array-concat = "0.5.2" array-concat = "0.5.2"
rayon = { workspace = true }
[features] [features]
debug-shader = [] debug-shader = []
stable = ["librashader-reflect/stable"] stable = ["librashader-reflect/stable"]

View file

@ -28,11 +28,12 @@ widestring = "1.0.2"
array-concat = "0.5.2" array-concat = "0.5.2"
mach-siegbert-vogt-dxcsa = "0.1.3" mach-siegbert-vogt-dxcsa = "0.1.3"
rayon = "1.6.1"
gpu-allocator = { version = "0.27.0", features = ["d3d12"], default-features = false} gpu-allocator = { version = "0.27.0", features = ["d3d12"], default-features = false}
parking_lot = "0.12.3" parking_lot = "0.12.3"
d3d12-descriptor-heap = "0.2.0" d3d12-descriptor-heap = "0.2.0"
rayon = { workspace = true }
[features] [features]
stable = ["librashader-reflect/stable"] stable = ["librashader-reflect/stable"]

View file

@ -23,7 +23,7 @@ spirv-cross2 = { workspace = true, features = ["glsl"] }
glow = { workspace = true} glow = { workspace = true}
bytemuck = { version = "1.12.3", features = ["derive"] } bytemuck = { version = "1.12.3", features = ["derive"] }
thiserror = "1.0.37" thiserror = "1.0.37"
rayon = "1.6.1" rayon = { workspace = true }
array-init = "2.1.0" array-init = "2.1.0"
[features] [features]

View file

@ -23,7 +23,7 @@ librashader-runtime = { path = "../librashader-runtime" , version = "0.4.5" }
thiserror = "1.0" thiserror = "1.0"
array-concat = "0.5.2" array-concat = "0.5.2"
bytemuck = { version = "1.12.3", features = ["derive"] } bytemuck = { version = "1.12.3", features = ["derive"] }
rayon = "1.8.1" rayon = { workspace = true }
[[test]] [[test]]
name = "triangle" name = "triangle"

View file

@ -25,7 +25,7 @@ bytemuck = { version = "1.12.3", features = ["derive"] }
thiserror = "1.0.37" thiserror = "1.0.37"
gpu-allocator = { version = "0.27.0", default-features = false, features = ["vulkan"] } gpu-allocator = { version = "0.27.0", default-features = false, features = ["vulkan"] }
parking_lot = "0.12.1" parking_lot = "0.12.1"
rayon = "1.6.1" rayon = { workspace = true }
array-concat = "0.5.2" array-concat = "0.5.2"
ash = { workspace = true, features = ["debug"] } ash = { workspace = true, features = ["debug"] }

View file

@ -35,7 +35,7 @@ wgpu_webgpu = ["wgpu/webgpu"]
stable = ["librashader-reflect/stable"] stable = ["librashader-reflect/stable"]
[target.'cfg(not(target_arch="wasm32"))'.dependencies] [target.'cfg(not(target_arch="wasm32"))'.dependencies]
rayon = "1.8.1" rayon = { workspace = true }
[dev-dependencies] [dev-dependencies]
config = { version = "0.13.4", features = [] } config = { version = "0.13.4", features = [] }

View file

@ -21,11 +21,5 @@ num-traits = "0.2.15"
array-concat = "0.5.2" array-concat = "0.5.2"
arc-swap = "1.7.1" arc-swap = "1.7.1"
[dependencies.image] image = { workspace = true }
version = "0.25.2"
features = [
"gif", "jpeg", "png",
"tga", "pnm", "tiff",
"webp", "bmp", "dds",
]
default-features = false