Remove unused dependencies and use different cfg

This commit is contained in:
Maximilian Ammann 2022-03-14 17:46:39 +01:00
parent 5a9cacc2ca
commit bd9523394a
4 changed files with 7 additions and 16 deletions

2
Cargo.lock generated
View File

@ -1623,14 +1623,12 @@ dependencies = [
name = "mapr" name = "mapr"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"async-trait",
"bytemuck", "bytemuck",
"bytemuck_derive", "bytemuck_derive",
"cgmath", "cgmath",
"console_error_panic_hook", "console_error_panic_hook",
"console_log", "console_log",
"criterion", "criterion",
"crossbeam-channel",
"env_logger", "env_logger",
"include_dir", "include_dir",
"instant", "instant",

View File

@ -31,7 +31,6 @@ web-webgl = ["wgpu/webgl"]
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1" console_error_panic_hook = "0.1"
winit = { version = "0.26", default-features = false }
web-sys = { version = "0.3", features = [ web-sys = { version = "0.3", features = [
"Window", "Window",
"Headers", "Headers",
@ -43,31 +42,24 @@ wasm-bindgen-futures = "0.4"
console_log = { version = "0.2", features = ["color"] } console_log = { version = "0.2", features = ["color"] }
instant = { version = "0.1", features = ["stdweb"] } # FIXME: Untrusted dependency 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"] } tokio = { version = "1.15", features = ["full"] }
env_logger = "0.9" env_logger = "0.9"
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "gzip"] } reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "gzip"] }
reqwest-middleware-cache = "0.1" # FIXME: Untrusted dependency reqwest-middleware-cache = "0.1" # FIXME: Untrusted dependency
reqwest-middleware = { version = "0.1" } # FIXME: Untrusted dependency reqwest-middleware = { version = "0.1" } # FIXME: Untrusted dependency
[target.'cfg(target_os = "android")'.dependencies] [target.'cfg(target_os = "android")'.dependencies]
ndk-glue = "0.5.0" # version is required by winit ndk-glue = "0.5.0" # version is required by winit
winit = { version = "0.26", default-features = false } winit = { version = "0.26", default-features = false }
# Use rusttls on android because cross compiling is difficult # Use rusttls on android because cross compiling is difficult
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "gzip"] } 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] [target.'cfg(target_os = "linux")'.dependencies]
winit = { version = "0.26", default-features = false, features = ["x11", "wayland"] } winit = { version = "0.26", default-features = false, features = ["x11", "wayland"] }
[dependencies] [dependencies]
winit = { version = "0.26", default-features = false }
async-trait = "0.1"
# For MPMS (instead of only MPSC)
crossbeam-channel = "0.5"
# Vector riles # Vector riles
vector-tile = { path = "./libs/vector_tile" } vector-tile = { path = "./libs/vector_tile" }

View File

@ -4,7 +4,7 @@
#[cfg(target_arch = "wasm32")] #[cfg(target_arch = "wasm32")]
mod web; mod web;
#[cfg(all(target_arch = "aarch64", not(target_os = "android")))] #[cfg(any(target_os = "macos", target_os = "ios"))]
mod apple; mod apple;
#[cfg(target_os = "android")] #[cfg(target_os = "android")]
@ -16,7 +16,8 @@ mod noweb;
/// For Vulkan/OpenGL /// For Vulkan/OpenGL
#[cfg(not(any( #[cfg(not(any(
target_os = "android", target_os = "android",
all(target_arch = "aarch64", not(target_os = "android")), target_os = "macos",
target_os = "ios",
target_arch = "wasm32" target_arch = "wasm32"
)))] )))]
pub const COLOR_TEXTURE_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Bgra8UnormSrgb; 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")] #[cfg(target_arch = "wasm32")]
pub use web::*; pub use web::*;
#[cfg(all(target_arch = "aarch64", not(target_os = "android")))] #[cfg(any(target_os = "macos", target_os = "ios"))]
pub use apple::*; pub use apple::*;
#[cfg(target_os = "android")] #[cfg(target_os = "android")]

View File

@ -12,9 +12,9 @@ use crate::io::scheduler::IOScheduler;
use crate::io::scheduler::ScheduleMethod; use crate::io::scheduler::ScheduleMethod;
use crate::io::scheduler::ThreadLocalTessellatorState; use crate::io::scheduler::ThreadLocalTessellatorState;
use crate::MapBuilder; use crate::MapBuilder;
use crate::WebWorkerScheduleMethod;
use console_error_panic_hook; use console_error_panic_hook;
pub use instant::Instant; pub use instant::Instant;
use scheduler::WebWorkerScheduleMethod;
use style_spec::source::TileAdressingScheme; use style_spec::source::TileAdressingScheme;
use wasm_bindgen::prelude::*; use wasm_bindgen::prelude::*;
use wasm_bindgen::prelude::*; use wasm_bindgen::prelude::*;