Replies: 1 comment 3 replies
|
Main problem for MapLibre Compose was the varying API surfaces across MapLibre Native Android and iOS, plus the complexity of integrating with the C++ core (from JVM for desktop, plus eventually Android JNI / Kotlin Native). So https://github.com/maplibre/maplibre-native-ffi exposes one uniform C ABI, as C is easily callable from many languages/runtimes. So the idea is I write direct bindings to that C API for languages that can import them (Java FFM, Zig, Rust, Swift, Kotlin, ...), and adapters through Rust for those that need native-side glue (Node, Python, Java JNI). (it would also be reasonable to invert the C/Rust relationship here, with Rust bound to MLN via In my cmake build I build MLN_WITH_CORE_ONLY and explicitly list the additional files and libraries MLN requires for the platform, so I get deep control over each platform's build. Currently supports:
I haven't tried this with wgpu yet, but sharing textures works well with Metal and Vulkan at least.
Curious, is there a reason whatever http implementation MLN already uses for Android wasn't usable in your Rust wrapper? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This discussion shall be used as base for interfaces for other languages.
For Rust:
Faced problems:
For the platform interface I started creating a new "platform". Below is a prototype for the http bridge to gain internet access:
Just write down your thoughts and your problems you faced to interface maplibre-native
What are your approaches to get for example internet access?
All reactions