crates/goose-sdk/examples/uniffi/README.md
These examples exercise the in-process Goose SDK UniFFI bindings from Python and Kotlin.
source bin/activate-hermit
The Python example uses the declarative DeepSeek provider:
export DEEPSEEK_API_KEY=...
The Kotlin/JVM Maven smoke test uses the native OpenAI provider:
export OPENAI_API_KEY=...
Regenerate the Python bindings before running the Python example:
just --justfile crates/goose-sdk/justfile _generate python
This writes generated bindings and the debug native library under crates/goose-sdk/generated/.
DYLD_LIBRARY_PATH=target/debug LD_LIBRARY_PATH=target/debug \
uv run --script crates/goose-sdk/examples/uniffi/provider.py
Build the local Maven artifact and run the downstream smoke test app:
just --justfile crates/goose-sdk/justfile maven-package
cd crates/goose-sdk/examples/uniffi/kotlin
gradle --no-daemon run
Or run the same flow through the goose-sdk justfile:
just --justfile crates/goose-sdk/justfile kotlin
The Kotlin example consumes the local Maven artifact io.github.aaif-goose:gdk from mavenLocal() and imports the generated package namespace io.github.aaif_goose.
On newer JDKs, the example enables native access with --enable-native-access=ALL-UNNAMED because the SDK uses JNA to load the bundled native library.