waterkit 0.1.1

Kit utilities and helpers
docs.rs failed to build waterkit-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Waterkit

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.

Modules

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, Android location APIs, 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.

Advanced Modern Capabilities

  • 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.
  • full feature as a complete capability bundle, continuously validated by automated feature-surface tests.

📦 Installation

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"] }

Full Installation

If you want everything:

[dependencies]
waterkit = { version = "0.1", features = ["full"] }

Platform Support

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

Usage Example

Here's a quick example of using multiple modules together:

use waterkit::dialog::Dialog;
use waterkit::location::Location;
use waterkit::permission::{Permission, PermissionStatus};

async fn example() -> Result<(), Box<dyn std::error::Error>> {
    // 1. Check Permissions
    let perm = waterkit::permission::check(Permission::Location).await;

    // 2. Request if needed
    let status = if perm == PermissionStatus::Granted {
        perm
    } else {
        waterkit::permission::request(Permission::Location).await?
    };

    if status != PermissionStatus::Granted {
        // 3. Show Native Alert
        Dialog::new(
            "Permission Denied",
            "We need location access to show you the map.",
        )
        .show()
        .await?;
        return Ok(());
    }

    // 4. Use Location
    let loc = Location::get().await?;
    log::info!(
        "Location: {}, {}",
        loc.latitude().get(),
        loc.longitude().get()
    );
    Ok(())
}

Contributing

Contributions are welcome! Please check individual crate directories for specific implementation details.

License

MIT OR Apache-2.0 License