mln-rs 0.0.9

A Rust port of the MapLibre Native map rendering core
Documentation

maplibre-native-next

CI crates.io docs.rs Codecov

A Rust port of the MapLibre Native core. Start with PLAN.md; working rules are in PORTING.md. The differential tests against the C++ core (//difftest/<area> in the docs and comments) are in mln-rs-difftests, which tests the released crates.

The tasks are in the justfile (just lists them; install just with cargo install just or your package manager):

just test                                    # every test
cargo test -p mln-rs-style                   # one library (package mln-rs-<name>)
cargo test -p mln-rs-util --test mln_util_gtest padding   # one test target, filtered
cargo test -p mln-rs-render-test --test render_tests      # the render and query tests
cargo test -p mln-rs-expression-test         # the expression tests
just coverage                                # their coverage, as HTML (CI
                                             # uploads it to Codecov)
just fmt                                     # format every Rust file

# The GLFW app: OpenFreeMap Liberty in a window (needs a display and the
# system GLFW; wgpu picks Vulkan on Linux and Metal on macOS).
just glfw

The render suite writes its report and the actual and diff images to target/tmp/render_tests/. cargo run -p mln-rs-render-test -- --help runs the runner itself, e.g. with a --filter.

Test data

The tests read files of the C++ repository (fixtures, the render, query and expression suites, the style spec) from copies in this repository: each package's testdata/ holds the files its tests read, at their paths in maplibre-native. They were copied from louwers/maplibre-native@4e03abe (maplibre/maplibre-native 8e144d0 plus build changes), under its licenses. just update-testdata [checkout] copies them again from a maplibre-native checkout (by default ../maplibre-native); the render, query and expression suites are copied whole, so new tests come along.

The GPU tests need an adapter: Metal on macOS, Vulkan on Linux (without a GPU, lavapipe through VK_DRIVER_FILES). On NixOS, the justfile runs the tests and the apps inside the C++ repo's #linux dev shell.

CI runs the justfile's ci-* recipes: just ci-lint checks the formatting, and runs clippy and rustdoc with warnings as errors.