tools: add UniFFI codegen script (no-op if uniffi-bindgen missing)
This commit is contained in:
parent
be9f34fcc2
commit
f76584a50e
1 changed files with 17 additions and 0 deletions
17
scripts/uniffi_codegen.sh
Executable file
17
scripts/uniffi_codegen.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
UDL=core/uniffi/cryptec.udl
|
||||||
|
OUT_ANDROID=core/uniffi/bindings/android
|
||||||
|
OUT_IOS=core/uniffi/bindings/ios
|
||||||
|
|
||||||
|
echo "[uniffi-codegen] UDL: $UDL"
|
||||||
|
|
||||||
|
if command -v uniffi-bindgen >/dev/null 2>&1; then
|
||||||
|
echo "[uniffi-codegen] running uniffi-bindgen (java, objc)"
|
||||||
|
uniffi-bindgen generate "$UDL" -l java -o "$OUT_ANDROID"
|
||||||
|
uniffi-bindgen generate "$UDL" -l objc -o "$OUT_IOS"
|
||||||
|
echo "[uniffi-codegen] generated bindings in $OUT_ANDROID and $OUT_IOS"
|
||||||
|
else
|
||||||
|
echo "[uniffi-codegen] uniffi-bindgen not found; skipping codegen (placeholders must exist)"
|
||||||
|
fi
|
||||||
Loading…
Add table
Reference in a new issue