diff --git a/Cargo.lock b/Cargo.lock index 1c4a942..1da00aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1624,6 +1624,20 @@ dependencies = [ "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]] name = "librashader-preprocess" version = "0.4.5" diff --git a/Cargo.toml b/Cargo.toml index 5743d54..9782641 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ members = [ "librashader-cache", "librashader-capi", "librashader-build-script", - "librashader-cli"] + "librashader-cli", "librashader-pack"] resolver = "2" [workspace.dependencies] @@ -32,6 +32,17 @@ wgpu = { version = "22", default-features = false } wgpu-types = { version = "22" } 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] diff --git a/librashader-cli/Cargo.toml b/librashader-cli/Cargo.toml index e806e47..f27e197 100644 --- a/librashader-cli/Cargo.toml +++ b/librashader-cli/Cargo.toml @@ -17,7 +17,7 @@ librashader-runtime = { version = "0.4.5", path = "../librashader-runtime"} wgpu = { version = "22", default-features = false, optional = true } wgpu-types = { version = "22", optional = true } anyhow = "1.0.86" -image = { version = "0.25.2", default-features = false, features = ["png"] } +image = { workspace = true } gfx-maths = "0.2.8" pollster = "0.3.0" diff --git a/librashader-pack/Cargo.toml b/librashader-pack/Cargo.toml new file mode 100644 index 0000000..2256ec0 --- /dev/null +++ b/librashader-pack/Cargo.toml @@ -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} \ No newline at end of file diff --git a/librashader-pack/src/lib.rs b/librashader-pack/src/lib.rs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/librashader-pack/src/lib.rs @@ -0,0 +1 @@ + diff --git a/librashader-runtime-d3d11/Cargo.toml b/librashader-runtime-d3d11/Cargo.toml index b200e76..48057de 100644 --- a/librashader-runtime-d3d11/Cargo.toml +++ b/librashader-runtime-d3d11/Cargo.toml @@ -21,9 +21,10 @@ librashader-cache = { path = "../librashader-cache", version = "0.4.5", features thiserror = "1.0.37" bytemuck = "1.12.3" -rayon = "1.6.1" array-concat = "0.5.2" +rayon = { workspace = true } + [features] debug-shader = [] stable = ["librashader-reflect/stable"] diff --git a/librashader-runtime-d3d12/Cargo.toml b/librashader-runtime-d3d12/Cargo.toml index 1f95bf0..3dfb14a 100644 --- a/librashader-runtime-d3d12/Cargo.toml +++ b/librashader-runtime-d3d12/Cargo.toml @@ -28,11 +28,12 @@ widestring = "1.0.2" array-concat = "0.5.2" mach-siegbert-vogt-dxcsa = "0.1.3" -rayon = "1.6.1" gpu-allocator = { version = "0.27.0", features = ["d3d12"], default-features = false} parking_lot = "0.12.3" d3d12-descriptor-heap = "0.2.0" +rayon = { workspace = true } + [features] stable = ["librashader-reflect/stable"] diff --git a/librashader-runtime-gl/Cargo.toml b/librashader-runtime-gl/Cargo.toml index e4b0871..44b6e3d 100644 --- a/librashader-runtime-gl/Cargo.toml +++ b/librashader-runtime-gl/Cargo.toml @@ -23,7 +23,7 @@ spirv-cross2 = { workspace = true, features = ["glsl"] } glow = { workspace = true} bytemuck = { version = "1.12.3", features = ["derive"] } thiserror = "1.0.37" -rayon = "1.6.1" +rayon = { workspace = true } array-init = "2.1.0" [features] diff --git a/librashader-runtime-mtl/Cargo.toml b/librashader-runtime-mtl/Cargo.toml index f69c085..33cbbf8 100644 --- a/librashader-runtime-mtl/Cargo.toml +++ b/librashader-runtime-mtl/Cargo.toml @@ -23,7 +23,7 @@ librashader-runtime = { path = "../librashader-runtime" , version = "0.4.5" } thiserror = "1.0" array-concat = "0.5.2" bytemuck = { version = "1.12.3", features = ["derive"] } -rayon = "1.8.1" +rayon = { workspace = true } [[test]] name = "triangle" diff --git a/librashader-runtime-vk/Cargo.toml b/librashader-runtime-vk/Cargo.toml index ab37d66..2123ed9 100644 --- a/librashader-runtime-vk/Cargo.toml +++ b/librashader-runtime-vk/Cargo.toml @@ -25,7 +25,7 @@ bytemuck = { version = "1.12.3", features = ["derive"] } thiserror = "1.0.37" gpu-allocator = { version = "0.27.0", default-features = false, features = ["vulkan"] } parking_lot = "0.12.1" -rayon = "1.6.1" +rayon = { workspace = true } array-concat = "0.5.2" ash = { workspace = true, features = ["debug"] } diff --git a/librashader-runtime-wgpu/Cargo.toml b/librashader-runtime-wgpu/Cargo.toml index 39a657f..7f99e97 100644 --- a/librashader-runtime-wgpu/Cargo.toml +++ b/librashader-runtime-wgpu/Cargo.toml @@ -35,7 +35,7 @@ wgpu_webgpu = ["wgpu/webgpu"] stable = ["librashader-reflect/stable"] [target.'cfg(not(target_arch="wasm32"))'.dependencies] -rayon = "1.8.1" +rayon = { workspace = true } [dev-dependencies] config = { version = "0.13.4", features = [] } diff --git a/librashader-runtime/Cargo.toml b/librashader-runtime/Cargo.toml index 2b5e8c3..e0d1828 100644 --- a/librashader-runtime/Cargo.toml +++ b/librashader-runtime/Cargo.toml @@ -21,11 +21,5 @@ num-traits = "0.2.15" array-concat = "0.5.2" arc-swap = "1.7.1" -[dependencies.image] -version = "0.25.2" -features = [ - "gif", "jpeg", "png", - "tga", "pnm", "tiff", - "webp", "bmp", "dds", -] -default-features = false +image = { workspace = true } +