diff --git a/.idea/mapr.iml b/.idea/mapr.iml
index 7025ac16..9ed609f3 100644
--- a/.idea/mapr.iml
+++ b/.idea/mapr.iml
@@ -4,7 +4,9 @@
+
+
diff --git a/.idea/runConfigurations/Run_downloader.xml b/.idea/runConfigurations/Run_downloader.xml
index 82584c5c..a6700e42 100644
--- a/.idea/runConfigurations/Run_downloader.xml
+++ b/.idea/runConfigurations/Run_downloader.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/Cargo.toml b/Cargo.toml
index dd47091d..567ed1a5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,6 @@ wasm-bindgen-futures = "0.4"
console_log = { version = "0.2", features = ["color"] }
[dependencies]
-
# Futures
futures = "0.3.5"
pollster = "0.2"
@@ -46,9 +45,6 @@ env_logger = "0.9"
hexdump = "0.1"
bytemuck = "1.2.0"
-# Network
-# reqwest = { version = "0.11", features = ["gzip"] } FIXME: Incompatible with wasm
-
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
@@ -62,7 +58,3 @@ env_logger = "0.8" # Used for test-env-log
[[bin]]
name = "mapr"
path = "src/main.rs"
-
-[[bin]]
-name = "download_tiles"
-path = "src/utils/tile_downloader.rs"
diff --git a/libs/mapr_utils/Cargo.toml b/libs/mapr_utils/Cargo.toml
new file mode 100644
index 00000000..4737b7a3
--- /dev/null
+++ b/libs/mapr_utils/Cargo.toml
@@ -0,0 +1,16 @@
+[package]
+name = "mapr-utils"
+version = "0.1.0"
+description = ""
+edition = "2021"
+
+[dependencies]
+log = "0.4"
+# Network
+reqwest = { version = "0.11", features = ["gzip"] }
+vector-tile = { path = "../vector_tile" }
+tokio = { version = "1.14", features = ["full"] }
+
+[[bin]]
+name = "download_tiles"
+path = "src/tile_downloader.rs"
diff --git a/src/utils/tile_downloader.rs b/libs/mapr_utils/src/tile_downloader.rs
similarity index 88%
rename from src/utils/tile_downloader.rs
rename to libs/mapr_utils/src/tile_downloader.rs
index a1994b64..6fd0f68c 100644
--- a/src/utils/tile_downloader.rs
+++ b/libs/mapr_utils/src/tile_downloader.rs
@@ -1,6 +1,7 @@
use std::fs::File;
use std::io::copy;
use std::path::Path;
+use reqwest::Client;
use vector_tile::grid::*;
@@ -13,7 +14,7 @@ pub async fn download_tiles() {
y = y,
);
println!("{}", target);
- let client = reqwest::Client::builder()
+ let client = Client::builder()
.gzip(true)
.build().unwrap();
@@ -29,6 +30,7 @@ pub async fn download_tiles() {
}
}
-fn main() {
- pollster::block_on(download_tiles());
+#[tokio::main]
+async fn main() {
+ download_tiles().await
}
diff --git a/src/piplines.rs b/src/piplines.rs
index 41440076..088b27bb 100644
--- a/src/piplines.rs
+++ b/src/piplines.rs
@@ -1,5 +1,5 @@
use wgpu::{FragmentState, PipelineLayout, RenderPipelineDescriptor, VertexState};
-use crate::texture::Texture;
+
pub fn create_map_render_pipeline_description<'a>(
pipeline_layout: &'a PipelineLayout,
diff --git a/src/state.rs b/src/state.rs
index 97691e4f..0cc1c334 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -4,11 +4,11 @@ use std::ops::Range;
use lyon::math::Vector;
use lyon::tessellation::VertexBuffers;
-use vector_tile::{parse_tile, parse_tile_reader};
+use vector_tile::{parse_tile_reader};
use wgpu::util::DeviceExt;
-use winit::dpi::PhysicalSize;
-use winit::event::{ElementState, Event, KeyboardInput, VirtualKeyCode, WindowEvent};
-use winit::event_loop::ControlFlow;
+
+use winit::event::{ElementState, KeyboardInput, VirtualKeyCode, WindowEvent};
+
use winit::window::Window;
use crate::fps_meter::FPSMeter;
diff --git a/src/texture.rs b/src/texture.rs
index 6173c02f..d6f34773 100644
--- a/src/texture.rs
+++ b/src/texture.rs
@@ -9,7 +9,7 @@ impl Texture {
pub fn create_depth_texture(
device: &wgpu::Device,
config: &wgpu::SurfaceConfiguration,
- label: &str,
+ _label: &str,
sample_count: u32,
) -> Self {