mbgl-sys
Low-level FFI bindings to MapLibre GL Native for server-side map rendering.
Installation
[]
= "0.1"
Features
| Feature | Default | Description |
|---|---|---|
bundled |
✅ | Build from vendored MapLibre Native source tree (requires prior cmake build) |
prebuilt |
Download pre-compiled libraries from GitHub Releases | |
system |
Link against system-installed MapLibre Native libraries |
When neither native libraries nor source are available, a stub implementation is compiled that returns error codes for all operations. This allows the crate to compile on any platform for development without requiring the full native build.
Using pre-built binaries (recommended for crates.io)
[]
= { = "0.1", = false, = ["prebuilt"] }
The prebuilt feature automatically downloads the correct platform binary during cargo build. Supported targets: aarch64-apple-darwin, x86_64-unknown-linux-gnu.
Environment variables
| Variable | Description |
|---|---|
MBGL_SYS_LIB_DIR |
Path to a directory containing pre-compiled .a files — bypasses all other strategies |
Building with native rendering
macOS (Metal)
Linux (OpenGL)
License
MIT OR Apache-2.0