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.
-
🦀 Rusty Safety Leverages Rust's type system and
Resulttypes 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.
Add this to your Cargo.toml:
[dependencies]
polykv = "0.1.0"
tokio = { version = "1.0", features = ["full"] }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(())
}| 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.
MIT