Skip to content

build: install uniffi-bindgen outside the workspace - #93

Merged
heidari-dev merged 1 commit into
mainfrom
chore/drop-unmaintained-deps
Nov 14, 2026
Merged

heidari-dev merged 1 commit into
mainfrom
chore/drop-unmaintained-deps

Conversation

@heidari-dev

Copy link
Copy Markdown
Owner

Closes #92

kite-ffi had an optional bindgen feature and a uniffi-bindgen bin, which pulled uniffi_bindgen and 14 more crates into Cargo.lock. One of them, basic-toml, has a RUSTSEC unmaintained advisory that Scorecard counts. They are only needed to generate the Kotlin bindings, never at runtime.

apps/android/build-rust.sh now runs cargo install uniffi --version =X --locked --features cli --bin uniffi-bindgen --root target/uniffi-bindgen-X on first use, where X is the uniffi version read from Cargo.lock, so the generator always matches the library. The CI, release and screenshot workflows call the script, so they need no change. Cargo.lock loses 193 lines and gains none.

The other 7 advisories stay. bincode is not from bindgen: typed-index-collections in slint's compiler lists it, so it stays in the lock while slint does. pin-utils, ttf-parser and the zbus crates come from slint 1.18.1 and ksni 0.3.7 (both latest), daemonize from tun2proxy (#63). Expect Vulnerabilities to go from 8 findings to 7.

Testing: generated the Kotlin bindings from the same debug kite_ffi library with the old cargo run --features bindgen and with the installed 0.32.2 binary and compared them with diff -r: identical. cargo build --locked -p kite-ffi and cargo deny check pass. The Android CI job runs the new script end to end.

No new dependency in the workspace; the generator is the same crate and version as before.

The bindgen feature pulled uniffi_bindgen and its dependencies into Cargo.lock, among them basic-toml, which is flagged unmaintained. build-rust.sh now installs the generator with cargo install --locked into target/, at the version of the uniffi crate in Cargo.lock. The generated Kotlin is byte for byte the same.
@heidari-dev
heidari-dev merged commit 59c0996 into main Nov 14, 2026
16 checks passed
@heidari-dev
heidari-dev deleted the chore/drop-unmaintained-deps branch November 14, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep the Kotlin bindgen out of Cargo.lock

1 participant