diff --git a/crates/text/src/fontdb/names.rs b/crates/text/src/fontdb/names.rs index 7531b130ec..47faeeddae 100644 --- a/crates/text/src/fontdb/names.rs +++ b/crates/text/src/fontdb/names.rs @@ -15,6 +15,7 @@ pub(super) struct SysFallback { /// The most characters searched for in the font files themselves between two scans of the font /// folders. Real text has a few uncovered characters; a document of thousands of distinct /// private-use code points would reread the whole catalog for each. +#[cfg(not(target_arch = "wasm32"))] pub(super) const MAX_FILE_SEARCHES: u32 = 1024; /// Fonts made for Thai, tried first (when installed) for Thai the font in use lacks: Windows diff --git a/crates/ui-egui/src/updates_ui.rs b/crates/ui-egui/src/updates_ui.rs index 77a00c33a5..41f5e68372 100644 --- a/crates/ui-egui/src/updates_ui.rs +++ b/crates/ui-egui/src/updates_ui.rs @@ -9,6 +9,7 @@ use craft_update::updater::{Action, Status, Updater}; #[cfg(not(target_arch = "wasm32"))] use craft_update::{CheckResultDialog, CheckResultResponse}; +#[cfg_attr(target_arch = "wasm32", derive(Default))] pub(crate) struct Runtime { #[cfg(not(target_arch = "wasm32"))] updater: Updater, @@ -30,23 +31,15 @@ pub(crate) struct Runtime { pub(crate) status_message: Option, } +#[cfg(not(target_arch = "wasm32"))] impl Default for Runtime { fn default() -> Self { Self { - #[cfg(not(target_arch = "wasm32"))] updater: Updater::new(&crate::UPDATE_APP, env!("CARGO_PKG_VERSION")), - #[cfg(not(target_arch = "wasm32"))] startup_check: false, - #[cfg(not(target_arch = "wasm32"))] check_requested: false, - #[cfg(not(target_arch = "wasm32"))] repaint: None, - #[cfg(not(target_arch = "wasm32"))] was_blocking: false, - #[cfg(target_arch = "wasm32")] - manual_window_open: false, - #[cfg(target_arch = "wasm32")] - status_message: None, } } }