Skip to content

Commit d31f325

Browse files
louwersCommanderStormCopilotpre-commit-ci[bot]
authored
feat: use dependencies MapLibre Native amalgamation instead of system libraries (maplibre#56)
Builds on maplibre#48. You still need to link with curl. Will work once release https://github.com/maplibre/maplibre-native/releases/tag/core-4e47c6c0258f064996b7040502b52cbdf89b44ce is complete. Tested on Linux with `just build opengl` and `just build vulkan`. WIP macOS, blocker maplibre/maplibre-native#3768 --------- Co-authored-by: Frank Elsinga <frank@elsinga.de> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3c3a422 commit d31f325

File tree

4 files changed

+9
-36
lines changed

4 files changed

+9
-36
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
- runs-on: ubuntu-24.04-arm
4444
backend: vulkan
4545
# macOS ARM
46-
- runs-on: macos-latest
47-
backend: metal
46+
#- runs-on: macos-latest
47+
# backend: metal
4848
#- runs-on: macos-latest
4949
# backend: vulkan
5050
steps:
@@ -73,8 +73,8 @@ jobs:
7373
- runs-on: ubuntu-24.04-arm
7474
backend: opengl
7575
# macOS ARM
76-
- runs-on: macos-latest
77-
backend: metal
76+
#- runs-on: macos-latest
77+
# backend: metal
7878
#- runs-on: macos-latest
7979
# backend: vulkan
8080
steps:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The following platform and rendering-API combinations are supported and tested i
3333
| Linux ARM ||||
3434
| Windows x86 || 🟨 | 🟨 |
3535
| Windows ARM || 🟨 | 🟨 |
36-
| macOS ARM | | 🟨[^1] ||
36+
| macOS ARM | 🟨 | 🟨[^1] ||
3737

3838
<sub>
3939
✅ = IS supported and tested in CI

build.rs

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{env, fs};
33

44
use downloader::{Download, Downloader};
55

6-
const MLN_REVISION: &str = "core-aeaadc06b4e0614f4f243db4dce210c22dde9f9c";
6+
const MLN_REVISION: &str = "core-9b6325a14e2cf1cc29ab28c1855ad376f1ba4903";
77

88
/// Supported graphics rendering APIs.
99
#[derive(PartialEq, Eq, Clone, Copy)]
@@ -76,7 +76,7 @@ fn download_static(out_dir: &Path, revision: &str) -> (PathBuf, PathBuf) {
7676
} else if cfg!(all(target_os = "linux", target_arch = "x86_64")) {
7777
"amalgam-linux-x64"
7878
} else if cfg!(all(target_os = "macos", target_arch = "aarch64")) {
79-
"macos-arm64"
79+
"amalgam-macos-arm64"
8080
} else {
8181
panic!(
8282
"unsupported target: only linux and macos are currently supported by maplibre-native"
@@ -246,27 +246,10 @@ fn build_mln() {
246246
}
247247
}
248248

249-
println!("cargo:rustc-link-lib=sqlite3");
250-
println!("cargo:rustc-link-lib=uv");
251-
println!("cargo:rustc-link-lib=icuuc");
252-
println!("cargo:rustc-link-lib=icui18n");
253-
//println!("cargo:rustc-link-lib=nu"); // todo add to docs => git clone https://bitbucket.org/alekseyt/nunicode.git && cmake . && make && sudo make install
254-
println!("cargo:rustc-link-lib=jpeg");
255-
println!("cargo:rustc-link-lib=png");
256-
println!("cargo:rustc-link-lib=webp");
257249
println!("cargo:rustc-link-lib=curl");
258250
println!("cargo:rustc-link-lib=z");
259251
match GraphicsRenderingAPI::from_selected_features() {
260-
GraphicsRenderingAPI::Vulkan => {
261-
// all libraries below are from glslang-dev despite their names
262-
println!("cargo:rustc-link-lib=glslang");
263-
println!("cargo:rustc-link-lib=glslang-default-resource-limits");
264-
println!("cargo:rustc-link-lib=SPIRV");
265-
println!("cargo:rustc-link-lib=SPIRV-Tools-opt");
266-
println!("cargo:rustc-link-lib=SPIRV-Tools");
267-
println!("cargo:rustc-link-lib=MachineIndependent");
268-
println!("cargo:rustc-link-lib=GenericCodeGen");
269-
}
252+
GraphicsRenderingAPI::Vulkan => {}
270253
GraphicsRenderingAPI::OpenGL => {
271254
println!("cargo:rustc-link-lib=GL");
272255
println!("cargo:rustc-link-lib=EGL");

justfile

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,7 @@ install-dependencies backend='vulkan':
8383
build-essential \
8484
libcurl4-openssl-dev \
8585
libglfw3-dev \
86-
libjpeg-dev \
87-
libpng-dev \
88-
libsqlite3-dev \
8986
libuv1-dev \
90-
libwebp-dev \
9187
libz-dev
9288

9389
# Install macOS dependencies via Homebrew
@@ -97,14 +93,8 @@ install-dependencies backend='vulkan':
9793
{{if backend == 'vulkan' {'molten-vk vulkan-headers'} else {''} }} \
9894
curl \
9995
glfw \
100-
jpeg \
101-
libpng \
102-
sqlite \
10396
libuv \
104-
webp \
105-
zlib \
106-
icu4c
107-
brew link icu4c --force
97+
zlib
10898

10999
# Show current maplibre-native dependency information
110100
maplibre-native-info: (assert-cmd "curl") (assert-cmd "jq")

0 commit comments

Comments
 (0)