mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Update Rust for CI and IDEs (#207)
* Upgrade toolchain to 1.65 * Set minimum Rust version * Cargo workspaces * Set version manually * Set a specific rust version so we an upgrade is triggered * Use debug for wgpu-info for speedier compile * Install specific rev of wgpu-info * Fix windows build
This commit is contained in:
parent
1444ae7782
commit
fec6a408ee
10
.github/actions/install-driver/action.yml
vendored
10
.github/actions/install-driver/action.yml
vendored
@ -13,8 +13,10 @@ runs:
|
|||||||
sudo add-apt-repository ppa:oibaf/graphics-drivers -y
|
sudo add-apt-repository ppa:oibaf/graphics-drivers -y
|
||||||
|
|
||||||
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
|
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
|
||||||
- name: wgpu info
|
- name: Install wgpu-info
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
# Rev is for 0.14.1: https://github.com/gfx-rs/wgpu/tree/v0.14.1
|
||||||
cargo install --git "https://github.com/gfx-rs/wgpu" wgpu-info
|
run: cargo install --debug --git "https://github.com/gfx-rs/wgpu" --rev 77b9a99cf4c7ca2b6d46124f9e48e510c04b605d wgpu-info
|
||||||
wgpu-info
|
- name: wgpu-info
|
||||||
|
shell: bash
|
||||||
|
run: wgpu-info
|
||||||
|
|||||||
7
.github/workflows/demo-windows.yml
vendored
7
.github/workflows/demo-windows.yml
vendored
@ -19,7 +19,12 @@ jobs:
|
|||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
targets: x86_64-pc-windows-msvc
|
targets: x86_64-pc-windows-msvc
|
||||||
- uses: ilammy/msvc-dev-cmd@v1 # Provide access to lib.exe
|
# Setup MSVC in the msys2 environment.
|
||||||
|
# Does roughly that: https://anadoxin.org/blog/bringing-visual-studio-compiler-into-msys2-environment.html/
|
||||||
|
- uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
- name: Fix environment
|
||||||
|
shell: bash
|
||||||
|
run: rm "C:\\msys64\usr\bin\link.exe" # Rust seems to prefer the link.exe from msys2 instead of MSVC
|
||||||
- name: Show PATH
|
- name: Show PATH
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo $PATH
|
run: echo $PATH
|
||||||
|
|||||||
@ -15,6 +15,15 @@ members = [
|
|||||||
"benchmarks",
|
"benchmarks",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[workspace.package]
|
||||||
|
description = "Maps for Desktop, Mobile and Web"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
rust-version = "1.65"
|
||||||
|
license = "MIT OR Apache-2.0"
|
||||||
|
keywords = ["graphics"]
|
||||||
|
authors = ["Maximilian Ammann <max@maxammann.org>"]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
|||||||
@ -1,14 +1,18 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "maplibre-android" # Naming this "android" is not possible. Compilation fails.
|
name = "maplibre-android" # Naming this "android" is not possible. Compilation fails.
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
|
||||||
categories = []
|
|
||||||
edition = "2021"
|
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
description.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
authors.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
maplibre = { path = "../maplibre", features = ["thread-safe-futures"] }
|
maplibre = { path = "../maplibre", features = ["thread-safe-futures"] }
|
||||||
maplibre-winit = { path = "../maplibre-winit", version = "0.0.1" }
|
maplibre-winit = { path = "../maplibre-winit", version = "0.1.0" }
|
||||||
env_logger = "0.9.0"
|
env_logger = "0.9.0"
|
||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
ndk-glue = "0.7.0" # version is required by winit
|
ndk-glue = "0.7.0" # version is required by winit
|
||||||
|
|||||||
@ -34,7 +34,7 @@ cargo {
|
|||||||
libname = "maplibre_android"
|
libname = "maplibre_android"
|
||||||
targetDirectory = "${module}/../target"
|
targetDirectory = "${module}/../target"
|
||||||
profile = "debug"
|
profile = "debug"
|
||||||
rustupChannel = "nightly-2022-10-23"
|
rustupChannel = "nightly-2022-11-12" // Also change the version in justfile
|
||||||
|
|
||||||
|
|
||||||
features {
|
features {
|
||||||
|
|||||||
@ -1,14 +1,18 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "apple"
|
name = "apple"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
|
||||||
categories = []
|
|
||||||
edition = "2021"
|
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
description.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
authors.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
maplibre = { path = "../maplibre", features = ["thread-safe-futures"] }
|
maplibre = { path = "../maplibre", features = ["thread-safe-futures"] }
|
||||||
maplibre-winit = { path = "../maplibre-winit", version = "0.0.1" }
|
maplibre-winit = { path = "../maplibre-winit", version = "0.1.0" }
|
||||||
|
|
||||||
env_logger = "0.9.0"
|
env_logger = "0.9.0"
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,14 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "benchmarks"
|
name = "benchmarks"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
publish = false
|
||||||
categories = []
|
|
||||||
edition = "2021"
|
description.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
authors.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
maplibre = { path = "../maplibre", features = ["headless", "embed-static-tiles", "thread-safe-futures"] }
|
maplibre = { path = "../maplibre", features = ["headless", "embed-static-tiles", "thread-safe-futures"] }
|
||||||
|
|||||||
4
justfile
4
justfile
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
set shell := ["bash", "-c"]
|
set shell := ["bash", "-c"]
|
||||||
|
|
||||||
export NIGHTLY_TOOLCHAIN := "nightly-2022-10-23"
|
export NIGHTLY_TOOLCHAIN := "nightly-2022-11-12" # Also change the version in android/gradle/lib/build.gradle
|
||||||
export STABLE_TOOLCHAIN := "1.64"
|
export STABLE_TOOLCHAIN := "1.65"
|
||||||
|
|
||||||
export CARGO_TERM_COLOR := "always"
|
export CARGO_TERM_COLOR := "always"
|
||||||
export RUST_BACKTRACE := "1"
|
export RUST_BACKTRACE := "1"
|
||||||
|
|||||||
@ -2,12 +2,14 @@
|
|||||||
name = "maplibre-build-tools"
|
name = "maplibre-build-tools"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "A library with build tools for maplibre-rs"
|
description = "A library with build tools for maplibre-rs"
|
||||||
categories = []
|
|
||||||
edition = "2021"
|
|
||||||
authors = ["Maximilian Ammann <max@maxammann.org>"]
|
|
||||||
license = "MIT OR Apache-2.0"
|
|
||||||
readme = "../README.md"
|
readme = "../README.md"
|
||||||
|
|
||||||
|
edition.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
authors.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
sqlite = ["rusqlite"]
|
sqlite = ["rusqlite"]
|
||||||
|
|
||||||
|
|||||||
@ -1,21 +1,23 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "maplibre-demo"
|
name = "maplibre-demo"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
categories = []
|
description = "Demo of maplibre-re"
|
||||||
edition = "2021"
|
|
||||||
authors = ["Maximilian Ammann <max@maxammann.org>"]
|
|
||||||
license = "MIT OR Apache-2.0"
|
|
||||||
description = "Demo of maplibre"
|
|
||||||
readme = "../README.md"
|
readme = "../README.md"
|
||||||
|
|
||||||
|
edition.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
authors.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
web-webgl = ["maplibre/web-webgl"]
|
web-webgl = ["maplibre/web-webgl"]
|
||||||
trace = ["maplibre/trace"]
|
trace = ["maplibre/trace"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
env_logger = "0.9.0"
|
env_logger = "0.9.0"
|
||||||
maplibre = { path = "../maplibre", version = "0.0.2", features = ["headless", "thread-safe-futures"] }
|
maplibre = { path = "../maplibre", version = "0.1.0", features = ["headless", "thread-safe-futures"] }
|
||||||
maplibre-winit = { path = "../maplibre-winit", version = "0.0.1" }
|
maplibre-winit = { path = "../maplibre-winit", version = "0.1.0" }
|
||||||
|
|
||||||
tile-grid = "0.3"
|
tile-grid = "0.3"
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "maplibre-winit"
|
name = "maplibre-winit"
|
||||||
version = "0.0.1"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
|
||||||
|
description.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
authors.workspace = true
|
||||||
|
|
||||||
[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "linux", target_os = "android", target_os = "windows"))'.dependencies]
|
[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "linux", target_os = "android", target_os = "windows"))'.dependencies]
|
||||||
tokio = { version = "1.19.2", features = ["rt"] }
|
tokio = { version = "1.19.2", features = ["rt"] }
|
||||||
@ -18,7 +24,7 @@ wasm-bindgen = "0.2.81"
|
|||||||
wasm-bindgen-futures = "0.4.31"
|
wasm-bindgen-futures = "0.4.31"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
maplibre = { path = "../maplibre", version = "0.0.2" }
|
maplibre = { path = "../maplibre", version = "0.1.0" }
|
||||||
winit = { version = "0.27.2", default-features = false }
|
winit = { version = "0.27.2", default-features = false }
|
||||||
cgmath = "0.18.0"
|
cgmath = "0.18.0"
|
||||||
instant = { version = "0.1.12", features = ["wasm-bindgen"] } # TODO: Untrusted dependency
|
instant = { version = "0.1.12", features = ["wasm-bindgen"] } # TODO: Untrusted dependency
|
||||||
|
|||||||
@ -1,13 +1,16 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "maplibre"
|
name = "maplibre"
|
||||||
version = "0.0.2"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
authors = ["Maximilian Ammann <max@maxammann.org>"]
|
|
||||||
license = "MIT OR Apache-2.0"
|
|
||||||
description = "Native Maps for Web, Mobile and Desktop"
|
|
||||||
readme = "../README.md"
|
readme = "../README.md"
|
||||||
|
|
||||||
|
description.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
authors.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
web-webgl = ["wgpu/webgl"]
|
web-webgl = ["wgpu/webgl"]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
# This library version should match the $STABLE_TOOLCHAIN version of the justfile. The CI will not use
|
# The CI will not use the rust-toolchain.toml file to build this project.
|
||||||
# the rust-toolchain.toml file to build this project. The CI might use it though to build other Rust binaries, required
|
# The CI might use it though to build other Rust binaries, required for building maplibre-rs.
|
||||||
# for building maplibre-rs.
|
|
||||||
# This file is here to give IDEs a hint about which Rust version to use.
|
# This file is here to give IDEs a hint about which Rust version to use.
|
||||||
channel = "1.64"
|
# The version is set here instead of using stable, so we can make sure that a predictable version is used.
|
||||||
|
channel = "1.65"
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "web"
|
name = "web"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
|
||||||
categories = []
|
|
||||||
edition = "2021"
|
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
description.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
authors.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
web-webgl = ["maplibre/web-webgl"]
|
web-webgl = ["maplibre/web-webgl"]
|
||||||
trace = ["maplibre/trace", "tracing-wasm"]
|
trace = ["maplibre/trace", "tracing-wasm"]
|
||||||
@ -20,7 +24,7 @@ crate-type = ["cdylib", "rlib"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1.56"
|
async-trait = "0.1.56"
|
||||||
maplibre = { path = "../maplibre" }
|
maplibre = { path = "../maplibre" }
|
||||||
maplibre-winit = { path = "../maplibre-winit", version = "0.0.1" }
|
maplibre-winit = { path = "../maplibre-winit", version = "0.1.0" }
|
||||||
|
|
||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
rand = { version = "0.7", features = ["wasm-bindgen"] }
|
rand = { version = "0.7", features = ["wasm-bindgen"] }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user