# Persy
[![build status](https://gitlab.com/tglman/persy/badges/master/build.svg)](https://gitlab.com/tglman/persy/commits/master)
Persy is a transactional storage engine written in rust.
_*still under development, hacking welcome check out [new contributor friendly issues](https://gitlab.com/tglman/persy/issues?label_name%5B%5D=new+contributor+friendly) *_
[persy.rs](https://persy.rs)
[crate.io] (https://crates.io/crates/persy)
[doc.rs](https://docs.rs/persy/)
[twitter] (https://twitter.com/Persy_rs)
## COMPILING THE SOURCE
Checkout the source code:
```
git clone https://gitlab.com/tglman/persy.git
```
Compile and Test
```
cargo test
```
## INSTALL
Add it as dependency of your project:
```toml
[dependencies]
persy="0.2.0"
```
## USAGE EXAMPLE
Create a new persy file save some data in it and scan it.
```rust
use persy::{Persy,Config};
//...
Persy::create("./open.persy")?;
let persy = Persy::open("./open.persy",Config::new())?;
let mut tx = persy.begin()?;
persy.create_segment(&mut tx, "seg")?;
let data = vec![1;20];
persy.insert_record(&mut tx, "seg", &data)?;
let prepared = persy.prepare_commit(tx)?;
persy.commit(prepared)?;
for rec in persy.scan_records("seg")? {
assert_eq!(rec.content[0], 20);
//....
}
```
## CONTRIBUTION
There are a few option for contribute to persy, you can start from reviewing and suggesting API changes, jump directly to hacking the code or just playing a bit with docs.
If you want a list of possibility you can start from the list of [new contributor friendly issues](https://gitlab.com/tglman/persy/issues?label_name%5B%5D=new+contributor+friendly)