MapLibre Native FFI
MapLibre Native FFI provides an experimental C API for MapLibre Native. It targets low-level language bindings and host integrations that need a C boundary instead of direct C++ interop.
The API exposes MapLibre Native concepts directly. Framework concerns such as gestures, widgets, declarative UI, and application lifecycle integration belong in downstream adapters.
Use the Docs
Section titled “Use the Docs”- Start with Concepts to understand the runtime, map, render target, ownership, threading, and host integration model.
- Read the Usage guides for integration tasks.
- Consult the API Reference for declarations, ownership rules, and status values.
- If you are contributing, read the Development overview first.
Status
Section titled “Status”MapLibre Native FFI is pre-1.0. The C ABI is unstable while mln_c_version()
returns 0.
The C API covers most of the MapLibre Native API surface. Advanced extension APIs, including custom layers and shader registry access, are not yet included.
Tested in CI Built only
| Environment | Backends | Bindings | Examples |
|---|---|---|---|
| Linux x64 | Vulkan OpenGL | C# Go Kotlin/JVM Kotlin/Native Python Rust Swift Zig | compose-map lwjgl-map rust-map zig-map zig-readback |
| Linux arm64 | Vulkan OpenGL | C# Go Kotlin/JVM Python Rust Swift Zig | compose-map lwjgl-map rust-map zig-map zig-readback |
| macOS arm64 | Vulkan OpenGL Metal | C# Go Kotlin/JVM Kotlin/Native Python Rust Swift Zig | compose-map lwjgl-map rust-map swift-map zig-map zig-readback |
| Windows x64 | Vulkan OpenGL | C# Kotlin/JVM Python Rust Zig | compose-map lwjgl-map rust-map zig-map zig-readback |
| Windows arm64 | Vulkan OpenGL | C# Kotlin/JVM Python Rust Zig | compose-map lwjgl-map rust-map zig-map zig-readback |
| Android arm64 | Vulkan OpenGL | Kotlin/Android | android-map |
| Android x64 | Vulkan OpenGL | Kotlin/Android | android-map |
| iOS device arm64 | Metal | Swift | swift-map |
| iOS Simulator arm64 | Metal | Swift Zig | swift-map |
| OpenHarmony arm64 | Vulkan OpenGL | Rust | - |
OpenGL uses WGL on Windows and EGL on other platforms. macOS EGL uses ANGLE.