diff --git a/Cargo.toml b/Cargo.toml index 9a87fb1c..419258f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,7 +94,7 @@ env_logger = { version = "0.11.8", default-features = false } glow = "0.16.0" glutin = { version = "0.32.3", default-features = false } glutin-winit = { version = "0.5.0", default-features = false } -home = "0.5.9" # need to puse to an old version because newer version are incompatible with wasm (at least when building Rerun) +home = "0.5.9" image = { version = "0.25.6", default-features = false } js-sys = "0.3.81" kittest = { version = "0.2.0", git = "https://github.com/rerun-io/kittest.git" } diff --git a/crates/egui_kittest/Cargo.toml b/crates/egui_kittest/Cargo.toml index adb955e9..56ba13b9 100644 --- a/crates/egui_kittest/Cargo.toml +++ b/crates/egui_kittest/Cargo.toml @@ -61,12 +61,15 @@ wgpu = { workspace = true, features = [ # snapshot dependencies dify = { workspace = true, optional = true } -open = { workspace = true, optional = true } -tempfile = { workspace = true, optional = true } # Enable this when generating docs. document-features = { workspace = true, optional = true } +# Native dependencies: +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +open = { workspace = true, optional = true } +tempfile = { workspace = true, optional = true } + [dev-dependencies] egui = { workspace = true, features = ["default_fonts"] } image = { workspace = true, features = ["png"] } diff --git a/crates/egui_kittest/src/snapshot.rs b/crates/egui_kittest/src/snapshot.rs index 07bea5c9..9282edb5 100644 --- a/crates/egui_kittest/src/snapshot.rs +++ b/crates/egui_kittest/src/snapshot.rs @@ -641,6 +641,7 @@ impl Harness<'_, State> { /// This method is marked as deprecated to trigger errors in CI (so that it's not accidentally /// committed). #[deprecated = "Only for debugging, don't commit this."] + #[cfg(not(target_arch = "wasm32"))] pub fn debug_open_snapshot(&mut self) { let image = self .render()