Skip to content

Commit

Permalink
Chore: upgrade deps (#286)
Browse files Browse the repository at this point in the history
* upgrade deps, fix keywords/categories

* just fmt

* remove backends in wgpu
  • Loading branch information
nyurik authored Sep 24, 2023
1 parent e3c398b commit 04ff088
Show file tree
Hide file tree
Showing 36 changed files with 232 additions and 159 deletions.
56 changes: 29 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ members = [
description = "Maps for Desktop, Mobile and Web"
version = "0.1.0"
edition = "2021"
rust-version = "1.65"
# Keep this in sync with `rust-toolchain.toml` and `justfile`
rust-version = "1.72.1"
license = "MIT OR Apache-2.0"
keywords = ["graphics", "science::geo"]
keywords = ["graphics", "maps", "webgl", "tiles"]
categories = ["graphics", "science::geo"]
authors = ["Maximilian Ammann <[email protected]>"]

[workspace.dependencies]
Expand All @@ -40,56 +42,56 @@ winit = { version = "0.27.5", default-features = false, features = [] }
#
# These dependencies should be updated to the latest version
#
async-trait = "0.1.68"
bytemuck = "1.13.1"
bytemuck_derive = "1.4.1"
async-trait = "0.1.73"
bytemuck = "1.14.0"
bytemuck_derive = "1.5.0"
cgmath = "0.18.0"
cint = "0.3.1"
clap = { version = "4.3.0", features = ["derive"] }
clap = { version = "4.3.24", features = ["derive"] }
console_error_panic_hook = "0.1.7"
console_log = { version = "1.0.0", features = ["color"] }
criterion = { version = "0.5.1", features = ["async_tokio"] }
csscolorparser = { version = "0.6.2", features = ["serde", "cint"] }
downcast-rs = "1.2.0"
env_logger = "0.10.0"
flatbuffers = "23.1.21"
flatbuffers = "23.5.26"
flatc-rust = "0.2.0"
flate2 = "1.0.26"
geo = "0.25.0"
geo-types = { version = "0.7.9", features = ["use-rstar_0_9"] }
geozero = { version = "0.9.9", default-features = false, features = ["with-mvt", "with-geo"] }
flate2 = "1.0.27"
geo = "0.26.0"
geo-types = { version = "0.7.11", features = ["use-rstar_0_9"] }
geozero = { version = "0.11.0", default-features = false, features = ["with-mvt", "with-geo"] }
image = { version = "0.24", default-features = false, features = ["jpeg", "webp", "png"] }
include_dir = "0.7.3"
instant = { version = "0.1.12", features = ["wasm-bindgen"] } # TODO: Untrusted dependency
jni = "0.21.1"
js-sys = "0.3.63"
log = "0.4.18"
js-sys = "0.3.64"
log = "0.4.20"
lyon = { version = "1.0.1", features = [] }
naga = { version = "0.12.1", features = ["wgsl-in"] }
naga = { version = "0.13.0", features = ["wgsl-in"] }
ndk-glue = "0.7.0" # version is required by winit. This might for winit 0.28+, see https://github.com/rust-windowing/winit#Android
png = { version = "0.17.8" }
png = { version = "0.17.10" }
raw-window-handle = "0.5.2"
reqwest = { version = "0.11.18", default-features = false, features = ["rustls-tls", "gzip"] } # Use rusttls on android because cross compiling is difficult
reqwest = { version = "0.11.20", default-features = false, features = ["rustls-tls", "gzip"] } # Use rusttls on android because cross compiling is difficult
reqwest-middleware-cache = "0.1.1" # FIXME: Untrusted dependency
rstar = "0.10.0"
rstar = "0.11.0"
rusqlite = { version = "0.29.0" }
serde = { version = "1.0.163", features = ["derive"] }
serde_json = "1.0.96"
smallvec = "1.10.0"
thiserror = "1.0.40"
tile-grid = "0.4"
tokio = "1.28.2" # Individual features are customized in each crate
tokio-util = { version = "0.7.8", features = ["rt"] }
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
smallvec = "1.11.1"
thiserror = "1.0.48"
tile-grid = "0.5"
tokio = "1.32.0" # Individual features are customized in each crate
tokio-util = { version = "0.7.9", features = ["rt"] }
tracing = "0.1.37"
tracing-subscriber = "0.3.17"
tracing-tracy = "0.10"
tracing-wasm = "0.2.1" # TODO: Low quality dependency (remove in a separate PR!)
walkdir = "2.3.3"
walkdir = "2.4.0"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
wasm-bindgen-test = "0.3"
web-sys = "0.3.63" # Individual features are customized in each crate
wgpu = "0.16.1"
web-sys = "0.3.64" # Individual features are customized in each crate
wgpu = "0.17.0"

[profile.release]
lto = true
Expand Down
1 change: 1 addition & 0 deletions android/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
authors.workspace = true

[dependencies]
Expand Down
3 changes: 2 additions & 1 deletion android/gradle/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ cargo {
libname = "maplibre_android"
targetDirectory = "${module}/../target"
profile = "debug"
rustupChannel = "nightly-2023-03-29" // Also change the version in justfile
// This should be in sync with the justfile
rustupChannel = "nightly-2023-09-23"


features {
Expand Down
1 change: 1 addition & 0 deletions apple/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
authors.workspace = true

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
authors.workspace = true

[dependencies]
Expand Down
8 changes: 5 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

set shell := ["bash", "-c"]

# Also change the version in android/gradle/lib/build.gradle
# Keep this in sync with `android/gradle/lib/build.gradle`
export NIGHTLY_TOOLCHAIN := "nightly-2023-09-23"

export NIGHTLY_TOOLCHAIN := "nightly-2023-03-29"
export STABLE_TOOLCHAIN := "1.65"
# Keep this in sync with `rust-toolchain.toml` and `Cargo.toml`.
# Make sure the above is newer than this.
export STABLE_TOOLCHAIN := "1.72.1"
export CARGO_TERM_COLOR := "always"
export RUST_BACKTRACE := "1"

Expand Down
1 change: 1 addition & 0 deletions maplibre-build-tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
authors.workspace = true

[features]
Expand Down
1 change: 1 addition & 0 deletions maplibre-demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
authors.workspace = true

[features]
Expand Down
1 change: 1 addition & 0 deletions maplibre-winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
authors.workspace = true

[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "linux", target_os = "android", target_os = "windows"))'.dependencies]
Expand Down
1 change: 1 addition & 0 deletions maplibre/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
authors.workspace = true

[features]
Expand Down
7 changes: 4 additions & 3 deletions maplibre/src/debug/cleanup_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ use crate::{context::MapContext, debug::TileDebugItem, render::render_phase::Ren
pub fn cleanup_system(MapContext { world, .. }: &mut MapContext) {
let Some(debug_tile_phase) = world
.resources
.query_mut::<
&mut RenderPhase<TileDebugItem>,
>() else { return; };
.query_mut::<&mut RenderPhase<TileDebugItem>>()
else {
return;
};

debug_tile_phase.clear();
}
9 changes: 4 additions & 5 deletions maplibre/src/debug/queue_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ use crate::{
};

pub fn queue_system(MapContext { world, .. }: &mut MapContext) {
let Some((
Initialized(tile_view_pattern),
tile_debug_phase,
)) = world.resources.query_mut::<(
let Some((Initialized(tile_view_pattern), tile_debug_phase)) = world.resources.query_mut::<(
&mut Eventually<WgpuTileViewPattern>,
&mut RenderPhase<TileDebugItem>,
)>() else { return; };
)>() else {
return;
};

for view_tile in tile_view_pattern.iter() {
let coords = &view_tile.coords();
Expand Down
14 changes: 8 additions & 6 deletions maplibre/src/debug/render_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ impl<P: PhaseItem> RenderCommand<P> for SetDebugPipeline {
_item: &P,
pass: &mut TrackedRenderPass<'w>,
) -> RenderCommandResult {
let Some(Initialized(pipeline)) = world
.resources
.get::<Eventually<DebugPipeline>>() else { return RenderCommandResult::Failure; };
let Some(Initialized(pipeline)) = world.resources.get::<Eventually<DebugPipeline>>() else {
return RenderCommandResult::Failure;
};

pass.set_render_pipeline(pipeline);
RenderCommandResult::Success
Expand All @@ -34,9 +34,11 @@ impl RenderCommand<TileDebugItem> for DrawDebugOutline {
item: &TileDebugItem,
pass: &mut TrackedRenderPass<'w>,
) -> RenderCommandResult {
let Some(Initialized(tile_view_pattern)) = world
.resources
.get::<Eventually<WgpuTileViewPattern>>() else { return RenderCommandResult::Failure; };
let Some(Initialized(tile_view_pattern)) =
world.resources.get::<Eventually<WgpuTileViewPattern>>()
else {
return RenderCommandResult::Failure;
};

let source_shape = &item.source_shape;

Expand Down
11 changes: 6 additions & 5 deletions maplibre/src/debug/resource_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ pub fn resource_system(
..
}: &mut MapContext,
) {
let Some(
debug_pipeline
) = world.resources.query_mut::<
&mut Eventually<DebugPipeline>,
>() else { return; };
let Some(debug_pipeline) = world
.resources
.query_mut::<&mut Eventually<DebugPipeline>>()
else {
return;
};

debug_pipeline.initialize(|| {
let mask_shader = shaders::TileMaskShader {
Expand Down
12 changes: 9 additions & 3 deletions maplibre/src/raster/populate_world_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ impl<E: Environment, T: RasterTransferables> System for PopulateWorldSystem<E, T
if message.has_tag(T::LayerRaster::message_tag()) {
let message = message.into_transferable::<T::LayerRaster>();
let Some(component) = world
.tiles
.query_mut::<&mut RasterLayersDataComponent>(message.coords()) else { continue; };
.tiles
.query_mut::<&mut RasterLayersDataComponent>(message.coords())
else {
continue;
};

component
.layers
Expand All @@ -50,7 +53,10 @@ impl<E: Environment, T: RasterTransferables> System for PopulateWorldSystem<E, T
let message = message.into_transferable::<T::LayerRasterMissing>();
let Some(component) = world
.tiles
.query_mut::<&mut RasterLayersDataComponent>(message.coords()) else { continue; };
.query_mut::<&mut RasterLayersDataComponent>(message.coords())
else {
continue;
};

component
.layers
Expand Down
16 changes: 10 additions & 6 deletions maplibre/src/raster/queue_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ use crate::{
};

pub fn queue_system(MapContext { world, .. }: &mut MapContext) {
let Some((
Initialized(tile_view_pattern),
)) = world.resources.query::<(
&Eventually<WgpuTileViewPattern>,
)>() else { return; };
let Some((Initialized(tile_view_pattern),)) = world
.resources
.query::<(&Eventually<WgpuTileViewPattern>,)>()
else {
return;
};

let mut items = Vec::new();

Expand Down Expand Up @@ -49,7 +50,10 @@ pub fn queue_system(MapContext { world, .. }: &mut MapContext) {

let Some((layer_item_phase, tile_mask_phase)) = world
.resources
.query_mut::<(&mut RenderPhase<LayerItem>, &mut RenderPhase<TileMaskItem>,)>() else { return; };
.query_mut::<(&mut RenderPhase<LayerItem>, &mut RenderPhase<TileMaskItem>)>()
else {
return;
};

for (layer, mask) in items {
layer_item_phase.add(layer);
Expand Down
29 changes: 18 additions & 11 deletions maplibre/src/raster/render_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ impl<P: PhaseItem> RenderCommand<P> for SetRasterTilePipeline {
_item: &P,
pass: &mut TrackedRenderPass<'w>,
) -> RenderCommandResult {
let Some(Initialized(raster_resources)) = world
.resources
.get::<Eventually<RasterResources>>() else { return RenderCommandResult::Failure; };
let Some(Initialized(raster_resources)) =
world.resources.get::<Eventually<RasterResources>>()
else {
return RenderCommandResult::Failure;
};

pass.set_render_pipeline(raster_resources.pipeline());
RenderCommandResult::Success
Expand All @@ -32,12 +34,15 @@ impl<const I: usize> RenderCommand<LayerItem> for SetRasterViewBindGroup<I> {
item: &LayerItem,
pass: &mut TrackedRenderPass<'w>,
) -> RenderCommandResult {
let Some(Initialized(raster_resources)) = world
.resources
.get::<Eventually<RasterResources>>() else { return RenderCommandResult::Failure; };
let Some(Initialized(raster_resources)) =
world.resources.get::<Eventually<RasterResources>>()
else {
return RenderCommandResult::Failure;
};

let Some(bind_group) = raster_resources
.get_bound_texture(&item.tile.coords) else { return RenderCommandResult::Failure; };
let Some(bind_group) = raster_resources.get_bound_texture(&item.tile.coords) else {
return RenderCommandResult::Failure;
};

pass.set_bind_group(0, bind_group, &[]);
RenderCommandResult::Success
Expand All @@ -51,9 +56,11 @@ impl RenderCommand<LayerItem> for DrawRasterTile {
item: &LayerItem,
pass: &mut TrackedRenderPass<'w>,
) -> RenderCommandResult {
let Some(Initialized(tile_view_pattern)) = world
.resources
.get::<Eventually<WgpuTileViewPattern>>() else { return RenderCommandResult::Failure; };
let Some(Initialized(tile_view_pattern)) =
world.resources.get::<Eventually<WgpuTileViewPattern>>()
else {
return RenderCommandResult::Failure;
};

let source_shape = &item.source_shape;

Expand Down
4 changes: 2 additions & 2 deletions maplibre/src/raster/request_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ pub fn fetch_raster_apc<
kernel: K,
) -> AsyncProcedureFuture {
Box::pin(async move {
let Input::TileRequest {coords, style} = input else {
return Err(ProcedureError::IncompatibleInput)
let Input::TileRequest { coords, style } = input else {
return Err(ProcedureError::IncompatibleInput);
};

let raster_layers: HashSet<String> = style
Expand Down
5 changes: 4 additions & 1 deletion maplibre/src/raster/resource_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ pub fn resource_system(
) {
let Some(raster_resources) = world
.resources
.query_mut::<&mut Eventually<RasterResources>>() else { return; };
.query_mut::<&mut Eventually<RasterResources>>()
else {
return;
};

raster_resources.initialize(|| {
let shader = shaders::RasterTileShader {
Expand Down
Loading

0 comments on commit 04ff088

Please sign in to comment.