diff --git a/Cargo.lock b/Cargo.lock index a588cfda..b36b8c57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1623,14 +1623,12 @@ dependencies = [ name = "mapr" version = "0.1.0" dependencies = [ - "async-trait", "bytemuck", "bytemuck_derive", "cgmath", "console_error_panic_hook", "console_log", "criterion", - "crossbeam-channel", "env_logger", "include_dir", "instant", diff --git a/Cargo.toml b/Cargo.toml index 9a3264e3..155bc2d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,6 @@ web-webgl = ["wgpu/webgl"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" -winit = { version = "0.26", default-features = false } web-sys = { version = "0.3", features = [ "Window", "Headers", @@ -43,31 +42,24 @@ wasm-bindgen-futures = "0.4" console_log = { version = "0.2", features = ["color"] } instant = { version = "0.1", features = ["stdweb"] } # FIXME: Untrusted dependency -[target.'cfg(any(target_arch = "aarch64", target_os = "linux", target_os = "android"))'.dependencies] +[target.'cfg(any(target_arch = "macos", target_arch = "ios", target_os = "linux", target_os = "android"))'.dependencies] tokio = { version = "1.15", features = ["full"] } env_logger = "0.9" reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "gzip"] } reqwest-middleware-cache = "0.1" # FIXME: Untrusted dependency reqwest-middleware = { version = "0.1" } # FIXME: Untrusted dependency - [target.'cfg(target_os = "android")'.dependencies] ndk-glue = "0.5.0" # version is required by winit winit = { version = "0.26", default-features = false } # Use rusttls on android because cross compiling is difficult reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "gzip"] } -[target.'cfg(target_arch = "aarch64")'.dependencies] -winit = { version = "0.26", default-features = false } - [target.'cfg(target_os = "linux")'.dependencies] winit = { version = "0.26", default-features = false, features = ["x11", "wayland"] } [dependencies] - -async-trait = "0.1" -# For MPMS (instead of only MPSC) -crossbeam-channel = "0.5" +winit = { version = "0.26", default-features = false } # Vector riles vector-tile = { path = "./libs/vector_tile" } diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 3935ab1b..86875bcd 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -4,7 +4,7 @@ #[cfg(target_arch = "wasm32")] mod web; -#[cfg(all(target_arch = "aarch64", not(target_os = "android")))] +#[cfg(any(target_os = "macos", target_os = "ios"))] mod apple; #[cfg(target_os = "android")] @@ -16,7 +16,8 @@ mod noweb; /// For Vulkan/OpenGL #[cfg(not(any( target_os = "android", - all(target_arch = "aarch64", not(target_os = "android")), + target_os = "macos", + target_os = "ios", target_arch = "wasm32" )))] pub const COLOR_TEXTURE_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Bgra8UnormSrgb; @@ -24,7 +25,7 @@ pub const COLOR_TEXTURE_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Bgra8 #[cfg(target_arch = "wasm32")] pub use web::*; -#[cfg(all(target_arch = "aarch64", not(target_os = "android")))] +#[cfg(any(target_os = "macos", target_os = "ios"))] pub use apple::*; #[cfg(target_os = "android")] diff --git a/src/platform/web/mod.rs b/src/platform/web/mod.rs index 97843910..4f5213e8 100644 --- a/src/platform/web/mod.rs +++ b/src/platform/web/mod.rs @@ -12,9 +12,9 @@ use crate::io::scheduler::IOScheduler; use crate::io::scheduler::ScheduleMethod; use crate::io::scheduler::ThreadLocalTessellatorState; use crate::MapBuilder; -use crate::WebWorkerScheduleMethod; use console_error_panic_hook; pub use instant::Instant; +use scheduler::WebWorkerScheduleMethod; use style_spec::source::TileAdressingScheme; use wasm_bindgen::prelude::*; use wasm_bindgen::prelude::*;