rt(wgpu): don't enable all backends by default

This commit is contained in:
chyyran 2024-02-14 01:11:15 -05:00 committed by Ronny Chan
parent ad4e72f359
commit f058134944
3 changed files with 10 additions and 4 deletions

View file

@ -46,7 +46,7 @@ pub(crate) mod internal {
pub(crate) fn get_cache() -> Result<Persy, Box<dyn Error>> { pub(crate) fn get_cache() -> Result<Persy, Box<dyn Error>> {
let cache_dir = get_cache_dir()?; let cache_dir = get_cache_dir()?;
let conn = Persy::open_or_create_with(&cache_dir.join("librashader.db.1"), Config::new(), |persy| { let conn = Persy::open_or_create_with(&cache_dir.join("librashader.db.1"), Config::new(), |persy| {
let mut tx = persy.begin()?; let tx = persy.begin()?;
tx.commit()?; tx.commit()?;
Ok(()) Ok(())
})?; })?;

View file

@ -20,13 +20,20 @@ librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.11", features = ["wgsl"], default-features = false } librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.11", features = ["wgsl"], default-features = false }
librashader-runtime = { path = "../librashader-runtime" , version = "0.2.0-beta.11" } librashader-runtime = { path = "../librashader-runtime" , version = "0.2.0-beta.11" }
wgpu = { version = "0.19.0", features = ["spirv"] } wgpu = { version = "0.19.0", default-features = false, features = ["wgsl"] }
rustc-hash = "1.1.0" rustc-hash = "1.1.0"
image = "0.24.7" image = "0.24.7"
thiserror = "1.0.50" thiserror = "1.0.50"
bytemuck = { version = "1.14.0", features = ["derive"] } bytemuck = { version = "1.14.0", features = ["derive"] }
array-concat = "0.5.2" array-concat = "0.5.2"
[features]
# workaround for docsrs to not build metal-rs.
wgpu_dx12 = ["wgpu/dx12"]
wgpu_metal = ["wgpu/metal"]
wgpu_webgpu = ["wgpu/webgpu"]
[target.'cfg(not(target_arch="wasm32"))'.dependencies] [target.'cfg(not(target_arch="wasm32"))'.dependencies]
rayon = "1.8.1" rayon = "1.8.1"
@ -37,4 +44,3 @@ raw-window-handle = "0.6.0"
winit = "0.29.10" winit = "0.29.10"
pollster = "0.3" pollster = "0.3"
log = "0.4.20" log = "0.4.20"

View file

@ -28,7 +28,7 @@ librashader-runtime-mtl = { path = "../librashader-runtime-mtl", version = "0.2.
librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.11" } librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.11" }
ash = { version = "0.37", optional = true } ash = { version = "0.37", optional = true }
wgpu = { version = "0.19", optional = true } wgpu = { version = "0.19", default-features = false, optional = true }
wgpu-types = { version = "0.19", optional = true } wgpu-types = { version = "0.19", optional = true }
[target.'cfg(windows)'.dependencies.windows] [target.'cfg(windows)'.dependencies.windows]