#uni-ffi #ios #android #macos #gldf #macos-ios #geometry #l3d #photometric #3d

bin+lib gldf-rs-ffi

FFI bindings for GLDF library - iOS/macOS/Android support via UniFFI

2 releases

0.3.3 Dec 16, 2025
0.3.2 Dec 8, 2025

#137 in macOS and iOS APIs

GPL-3.0-or-later

535KB
11K SLoC

Rust 5.5K SLoC // 0.0% comments Swift 2.5K SLoC // 0.2% comments Kotlin 2.5K SLoC // 0.3% comments

gldf-rs-ffi

FFI (Foreign Function Interface) bindings for the GLDF library, providing native access to GLDF parsing capabilities from iOS, macOS, Android, and other platforms via UniFFI.

Overview

This crate provides C-compatible FFI bindings generated by UniFFI, enabling GLDF file parsing from:

  • iOS/macOS - Swift bindings
  • Android - Kotlin bindings
  • Other platforms - C-compatible interface

Features

  • Parse GLDF (General Lighting Data Format) files
  • Extract product information, light sources, and geometry data
  • Access embedded files (images, photometric data, 3D models)
  • Full L3D (3D geometry) support

Usage

Building

# Build the library
cargo build --release -p gldf-rs-ffi

# Generate Swift bindings
cargo run --bin uniffi-bindgen generate --library target/release/libgldf_ffi.dylib --language swift --out-dir ./bindings

# Generate Kotlin bindings
cargo run --bin uniffi-bindgen generate --library target/release/libgldf_ffi.so --language kotlin --out-dir ./bindings

Integration

See the main repository for integration examples with iOS and Android projects.

License

GPL-3.0-or-later

Dependencies

~8–10MB
~181K SLoC