simpleflake-rs

Travis Status: Build Status

Distributed ID generation in rust for the lazy. Based on the awesome python implementation from SawdustSoftware.

You can read an overview of what this does and why it came into being at the Sawdust Software Blog.

Installation

Just add this crate as a dependency to your Cargo.toml:

ini [dependencies.simpleflake] git = "https://github.com/michaelcontento/simpleflake-rs.git"

Usage

```rust extern crate simpleflake;

let newid = simpleflake::new(); println!("generated id: {}", newid);

let parts = simpleflake::parse(newid); println!("timestamp: {}", parts.timestamp); println!("random bits: {}", parts.randombits); ```