gl-sdk
Rust SDK for Greenlight with UniFFI bindings support.
Building
Build the library using Task:
Or directly with cargo from the workspace root:
Generating Language Bindings
Using Task (Recommended)
The easiest way to generate bindings is using the Task commands:
# Generate Python bindings
# Generate Kotlin bindings
# Generate Swift bindings
# Generate Ruby bindings
# Generate all language bindings
These commands work from any directory in the workspace.
Using uniffi-bindgen Directly
The project uses UniFFI to generate bindings for multiple languages from the UDL definition in src/sdk.udl.
The uniffi-bindgen tool is included in the workspace at libs/uniffi-bindgen.
Note: When using uniffi-bindgen directly, all commands must be run from the workspace root.
Generate Python Bindings
Generate Bindings for Other Languages
Replace --language python with:
kotlinfor Kotlinswiftfor Swiftrubyfor Ruby
Example for Kotlin:
Files
src/sdk.udl- UniFFI interface definitionbuild.rs- Build script that generates Rust scaffoldingbindings/- Generated language bindings (created by uniffi-bindgen)