rlite is a self-contained, serverless, zero-configuration, transactional redis-compatible database engine. rlite is to Redis what SQLite is to SQL.
rlite-rs is available on crates.io. Add the following dependency to your Cargo manifest:
toml
[dependencies]
rlite = "0.1.0"
```rust let path = Path::new("db.rld"); let rlite = Rlite::file(&path).unwrap();
rlite.writecommand(&["set".asbytes(), "key".asbytes(), "value".asbytes()]).unwrap(); asserteq!(conn.readreply().unwrap(), Reply::Status("OK".to_owned()));
conn.writecommand(&["get".asbytes(), "key".asbytes()]).unwrap(); asserteq!(conn.readreply().unwrap(), Reply::Data(b"value".tovec())); ```