Skip to content

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.

  • 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.

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.

Legend: 🟢 built and tested in CI; ❌ not yet implemented; - not applicable on that platform.

PlatformOpenGLVulkanMetalWebGPU
Linux🟢 EGL🟢-#37
Android#24#24-#37
macOS-🟢🟢#37
iOS--#25#37
Windows🟢 WGL🟢-#37

Legend: 🟢 present; 🟡 example without a binding yet; - not yet.

LanguageBindingExamplePackageEcosystem
Zig🟢🟢 zig-map, 🟢 zig-readback--
Rust🟢🟢 rust-map--
Java (FFM)🟢🟢 lwjgl-map--
Swift🟢🟢 swift-map--
Go#43---
Kotlin#47---
Python#49---
Node.js#50---
Dart#51---
C#🟢---
Java (JNI)#46---
Vala#119---