MapLibre Native FFI
MapLibre Native FFI is a C API for MapLibre Native, an engine that draws vector and raster maps from a MapLibre style document. It exposes MapLibre Native concepts directly across a C ABI and language bindings. Use it for SDKs and custom integrations that need direct control of the map and render session.
The MapLibre Android and iOS SDKs provide a map view that owns a window, a frame loop, and gesture handling. This API provides the map and render session. The host creates the window and graphics context, pumps the runtime, and decides when to draw each frame. A texture render target supports image export and compositing into a host scene.
See the examples in the repository for complete integration examples for each language binding.
Status
Section titled “Status”MapLibre Native FFI is pre-1.0. The C ABI is unstable while mln_c_version()
returns 0, and headers, package coordinates, and behavior change between
snapshots.
The C API covers most of the MapLibre Native API surface. Custom layers and shader registry access remain outside the current surface. Hosts that require custom draw calls or shaders must extend the native layer.
Tested in CI Built only
OpenGL uses WGL on Windows and EGL on other platforms. macOS EGL uses ANGLE.