Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
garious committed Feb 19, 2018
1 parent 5e3c781 commit 4809c09
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "silk"
description = "A silky smooth implementation of the Loom architecture"
version = "0.1.3"
version = "0.2.0"
documentation = "https://docs.rs/silk"
homepage = "http://loomprotocol.com/"
repository = "https://github.com/loomprotocol/silk"
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,30 @@ corresponding benchmarks are also added that demonstrate real performance boots.
feature set here will always be a ways behind the loom repo, but that this is an implementation
you can take to the bank, literally.

# Usage

Add the latest [silk package] (https://crates.io/crates/silk) to the `[dependencies]` section
of your Cargo.toml.

Create a *Historian* to create a *Proof-of-History* and then verify in parallel:

```rust
use historian::Historian;
use log::{Event, verify_slice};

fn main() {
let hist = Historian::new(0);

hist.sender.send(Event::Tick).unwrap();
let entry0 = hist.receiver.recv().unwrap();

hist.sender.send(Event::UserDataKey(0xdeadbeef)).unwrap();
let entry1 = hist.receiver.recv().unwrap();

assert!(verify_slice(&[entry0, entry1], 0));
}
```

# Developing

Building
Expand Down

0 comments on commit 4809c09

Please sign in to comment.