Waterkit is a comprehensive, modular collection of cross-platform utilities designed to empower Rust applications with native system capabilities. It bridges the gap between Rust and platform-specific APIs (iOS, Android, macOS, Windows, Linux), allowing you to build rich, native-feeling applications with a unified Rust interface.
Waterkit is organized into focused, independent crates. You can use the main waterkit crate with feature flags, or depend on individual crates directly.
| Feature / Crate | Description |
|---|---|
| Audio | Cross-platform audio playback and recording. |
| Background | Background refresh and heavy background task scheduling APIs. |
| Biometric | TouchID, FaceID, Windows Hello, and native biometric authentication. |
| Bluetooth | BLE scanning, device discovery, and connection management. |
| Calendar | Native calendar event read/write integrations. |
| Camera | Camera streaming and capture (Webcam, AVFoundation, Camera2). |
| Clipboard | System clipboard access for text and images. |
| Codec | Low-level hardware video/audio encoding and decoding. |
| Contacts | Native contacts query and synchronization helpers. |
| Deeplink | URL scheme and universal-link/deep-link handling. |
| Dialog | Native system alert dialogs, file pickers, and prompts. |
| FS | File system helpers, sandboxing, and file picking. |
| Haptic | Haptic feedback and vibration control. |
| Health | Health data integration (HealthKit / Health Connect). |
| Location | GPS and location services (CoreLocation, LocationManager, etc.). |
| NFC | NFC read/write and tag interaction workflows. |
| Notification | Local system notifications. |
| Permission | Unified API for requesting system permissions (Camera, Mic, Location, etc.). |
| Regional | Locale, preferred languages, region, and timezone context helpers. |
| Passkey | Native passkey registration/authentication ceremonies with ergonomic WebAuthn helpers. |
| Screen | Screen capture and display information. |
| Secret | Secure storage (Keychain, Keystore, Credential Locker). |
| Sensor | Access to device sensors (Accelerometer, Gyroscope, Magnetometer, etc.). |
| Share | Native share sheet and cross-app content sharing. |
| Speech | Speech recognition and text-to-speech integrations. |
| System | System information, connectivity status, and thermal info. |
| Video | High-level video playback and processing. |
- Hardware-accelerated media pipelines (
codec,video) with platform-native backends and GPU-friendly paths. - Privacy-first device access flows (
permission,biometric,secret) for secure user consent and authentication. - Deep OS integrations (
bluetooth,nfc,health,contacts,calendar,notification,deeplink,share,speech). - Async-first APIs across modules to fit modern concurrent Rust application architecture.
fullfeature as a complete capability bundle, continuously validated by automated feature-surface tests.
Add waterkit to your Cargo.toml. We recommend enabling only the features you need to keep compile times low.
[dependencies]
waterkit = { version = "0.1", features = ["location", "dialog", "haptic"] }If you want everything:
[dependencies]
waterkit = { version = "0.1", features = ["full"] }Waterkit uses a mix of pure Rust crates and native bridges (Swift/Kotlin) to achieve maximum compatibility and performance.
| Platform | Support | Implementation Details |
|---|---|---|
| macOS | ✅ First-class | Native Swift/ObjC, Frameworks |
| iOS | ✅ First-class | Swift Bridge, Native Frameworks |
| Android | ✅ First-class | JNI, Kotlin Bridge |
| Windows | ✅ Supported | windows-rs, Win32 APIs |
| Linux | 🚧 Beta | DBus, various system crates |
Here's a quick example of using multiple modules together:
use waterkit::permission::{Permission, PermissionStatus};
use waterkit::location::LocationManager;
use waterkit::dialog::{Alert, Button};
async fn example() {
// 1. Check Permissions
let perm = waterkit::permission::check(Permission::Location).await;
if perm != PermissionStatus::Granted {
// 2. Request if needed
let status = waterkit::permission::request(Permission::Location).await;
if status != PermissionStatus::Granted {
// 3. Show Native Alert
Alert::new("Permission Denied")
.message("We need location access to show you the map.")
.button(Button::default("OK"))
.show()
.await;
return;
}
}
// 4. Use Location
let location_manager = LocationManager::new().await.unwrap();
let loc = location_manager.get_current_location().await.unwrap();
log::info!("Location: {}, {}", loc.latitude, loc.longitude);
}Contributions are welcome! Please check individual crate directories for specific implementation details.
MIT OR Apache-2.0 License