#rendering-engine #tile #gis #maplibre

sys maplibre_native

Rust bindings to the MapLibre Native map rendering engine

2 releases

new 0.1.1 Mar 7, 2025
0.1.0 Mar 7, 2025

#171 in Geospatial

MIT/Apache

39KB
677 lines

MapLibre-native-rs

GitHub crates.io version docs.rs crates.io license CI build

Rust bindings to the MapLibre Native map rendering engine.

Usage

In order to compile, you must have the following dependencies (linux). No other system has been tested yet (PRs welcome). See the .github/workflows/ci.yml for the full list of dependencies.

  • ccache
  • CMake + Ninja

Apt Packages

  • build-esential
  • libcurl4-openssl-dev
  • libuv1-dev
  • libjpeg-dev
  • libpng-dev
  • libglfw3-dev
  • libwebp-dev
  • libopengl0
  • mesa-vulkan-drivers

Development

  • This project is easier to develop with just, a modern alternative to make. Install it with cargo install just.
  • To get a list of available commands, run just.
  • To run tests, use just test.

Compiling MapLibre Native

This crate relies on the MapLibre Native library, which is compiled as part of the build process:

  • if the MLN_FROM_SOURCE environment variable is set, the build script will compile the native library from that dir.
  • if this repo has been cloned, it will contain the /maplibre-native submodule, which will be used to compile the library. Make sure to run git submodule update --init --recursive to fetch the submodule.
  • if there is no /maplibre-native submodule, the build script assumes it is being run as a dependency, and will try to download the source into the OUT_DIR. Note that the first might take significant time to download and compile.

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.5–2.1MB
~35K SLoC