Behind jackin❯ — crates

jackin-usage-ffi

Synchronous UniFFI facade over jackin-usage host runtime for the native macOS agent-usage menu bar. Mirrors TableRock’s tablerock-ffi split: Rust owns all truth; Swift is display-only.

Limits only for Desktop DTOs — no token unit prices or historical usage trends.

Build

cargo build -p jackin-usage-ffi --release
cargo nextest run -p jackin-usage-ffi
cargo clippy -p jackin-usage-ffi --all-targets -- -D warnings

UniFFI surface (additive desktop v1)

Method / typeRole
set_format_prefsPresentation prefs (left/used, countdown/exact_clock)
compact_status_bar_label_forPinned surface compact label
compact_status_bar_stripWorst-first multi-surface strip
overview_rowsOverviewRowDtoPopover + Usage-window overview
next_refresh_labelNext refresh countdown / due
UsageViewDto.estimate_captionHonesty caption when estimated

Existing methods (snapshot, compact_status_bar_label, …) are unchanged.

Swift bindings

cargo xtask desktop bindings
# or: mise run desktop-bindings

XCFramework

cargo xtask desktop xcframework
# or: mise run desktop-xcframework

On this page