Skip to content

Uniffi poc#49

Draft
abergs wants to merge 4 commits intomainfrom
uniffi-sdk
Draft

Uniffi poc#49
abergs wants to merge 4 commits intomainfrom
uniffi-sdk

Conversation

@abergs
Copy link
Member

@abergs abergs commented Mar 14, 2026

🎟️ Tracking

📔 Objective

This PR adds a intial spaghetti on the wall uniffi bridge for language like:

  • Python, verified (generated bw_remote_uniffi.py)
  • Kotlin, generated .kt bindings
  • Swift, generated .swift + FFI header + modulemap)
  • Ruby, supported by UniFFI 0.28 out of the box
  • C#, so so community-supported via uniffi-bindgen-cs (separate bindgen, not built into uniffi 0.28 core)

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

abergs added 2 commits March 14, 2026 23:56
Introduces crates/bw-remote-uniffi, a UniFFI-based wrapper around the
Rust protocol stack that generates bindings for Python, Kotlin, Swift,
Ruby, and C# from a single crate using proc-macros (no UDL files).

API surface:
- RemoteAccessClient object (construct, connect, request_credential,
  list_sessions, is_ready, close)
- RemoteCredentialData and SessionInfo records
- RemoteAccessError enum (6 FFI-friendly categories mapped from 18+
  internal error variants)
- connect_and_request top-level convenience function

Includes uniffi-bindgen binary for generating language bindings,
Python example in examples/uniffi/, and full test coverage (21 unit
tests + 5 integration tests with real proxy server).
- Return error on mutex poison in connect() instead of silently dropping
  the connected client
- Increase event channel buffer from 32 to 256 to prevent potential
  deadlock (events are not consumed in headless mode)
- Remove unused event_rx field from RemoteAccessClient
- Implement Drop to auto-close connection if caller forgets close()
- Add double-connect integration test verifying second connect replaces
  the first cleanly
@github-actions
Copy link

github-actions bot commented Mar 14, 2026

Logo
Checkmarx One – Scan Summary & Detailsbc3f43a0-3d98-4cd9-9ae6-5e47aea8de05

Great job! No new security vulnerabilities introduced in this pull request

abergs added 2 commits March 15, 2026 00:30
- README.md with setup instructions, usage examples, and multi-language
  binding generation commands
- test.py interactive script with CLI args (--token, --domain, --identity)
- .gitignore to exclude generated bindings and native library artifacts
@sonarqubecloud
Copy link

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.

1 participant