polykv

Crates.iopolykv
lib.rspolykv
version0.1.1
created_at2025-12-20 12:28:51.881059+00
updated_at2025-12-22 01:26:28.87665+00
descriptionUniversal Native PolyKV for Rust
homepage
repositoryhttps://github.com/polykv/polykv
max_upload_size
id1996452
size27,434
june lee (melodysdreamj)

documentation

README

PolyKV - Rust

Crates.io version License Stars

Type-Safe Key-Value Store for Rust.

A modern persistence crate powered by tokio and serde. PolyKV for Rust gives you a type-safe interface to store data without the boilerplate of raw file I/O.

One API, Everywhere. This library is part of the PolyKV ecosystem. Use the same consistent API across 12+ languages.

✨ Why PolyKV Rust?

  • 🦀 Rusty Safety Leverages Rust's type system and Result types to ensure you handle every edge case.

  • ⚡️ Tokio Powered Built for high performance. Non-blocking I/O ensures your high-performance apps stay responsive.

  • 📦 Serde Integration Automatic JSON serialization and deserialization. Store complex structs as easily as primitives.

📦 Installation

Add this to your Cargo.toml:

[dependencies]
polykv = "0.1.0"
tokio = { version = "1.0", features = ["full"] }

🚀 Usage

Complete Async Workflow

use polykv::PolyKV;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let kv = PolyKV::new("MyRustApp");

    // 1. Save
    kv.set_string("session", "xyz-999").await?;
    kv.set_number("volume", 75.0).await?;

    // 2. Read
    if let Some(vol) = kv.get_number("volume").await? {
        println!("Volume: {}", vol);
    }

    // 3. Update
    kv.set_number("volume", 80.0).await?;

    // 4. Delete
    kv.remove("session").await?;

    // 5. Clear
    kv.clear().await?;

    Ok(())
}

🌍 Platform Support

Language Verified Runtime (✅) Build Only (🛠)
TypeScript CLI (Node.js), Browser, React Native (iOS/Android) -
Dart Flutter (iOS/Android/macOS), CLI -
Go macOS, Linux, Windows, iOS, Android, CLI -
Rust macOS, iOS, Android, CLI Linux, Windows
Swift iOS, macOS, CLI -
C++ macOS, iOS, Android, CLI -
Python CLI, Web, Android -
Kotlin CLI, Web, Android -
C# CLI Android, Windows
Java CLI, Android -
Ruby CLI -
PHP CLI -

✅ Runtime Verified: Full CRUD operations verified via automated tests on actual devices/simulators.

📜 License

MIT

Commit count: 0

cargo fmt