Hi everyone,
I’m sharing the Swift/Rust integration behind Swimble, an open-source Mumble voice client for macOS.
The project has two boundaries:
- UniFFI provides generated Swift bindings for commands, events and state.
- Bounded lock-free PCM queues carry audio through a small C interface, avoiding array serialization in audio callbacks.
Swift handles the SwiftUI interface, audio hardware, Keychain integration and global shortcuts. Rust handles the Mumble protocol, Opus processing and playback buffering.
The distinction is useful because UI state and audio have different requirements: commands and snapshots benefit from generated bindings, while audio callbacks need predictable work.
The implementation is available here:
github.com/jurek-zsl/Swimble
The relevant code is in MacClient/ and rust-core/, with an architecture overview and build instructions in the README.
I’d welcome discussion of this approach, especially from people who have integrated Swift with Rust or worked with real-time audio. Are there ownership or lifetime pitfalls you would look for at this boundary? Code review, documentation improvements and contributions are welcome too.
