2 releases
| 0.3.3 | Dec 16, 2025 |
|---|---|
| 0.3.2 | Dec 8, 2025 |
#137 in macOS and iOS APIs
535KB
11K
SLoC
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.
Related Crates
gldf-rs- Core GLDF parsing librarygldf-rs-wasm- WebAssembly bindingsgldf_rs_python- Python bindings
License
GPL-3.0-or-later
Dependencies
~8–10MB
~181K SLoC