1 unstable release

Uses old Rust 2015

0.3.1 Aug 19, 2019

#8 in #multi-hash

26 downloads per month
Used in 2 crates

MIT license

15KB
324 lines

rust-cid

Travis CI crates.io

CID implementation in Rust.

Table of Contents

Install

First add this to your Cargo.toml

[dependencies]
cid = "*"

Then run cargo build.

Usage

extern crate cid;
extern crate multihash;

use multihash::Hash;
use cid::{Cid, Codec, Version};
let h = multihash::encode(multihash::Hash::SHA2256, b"beep boop").unwrap();

let cid = Cid::new(Codec::DagProtobuf, Version::V1, &h);

let data = cid.to_bytes();
let out = Cid::from(data).unwrap();

assert_eq!(cid, out);

Maintainers

Captain: @dignifiedquire.

Contribute

Contributions welcome. Please check out the issues.

Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2017 Friedel Ziegelmayer

Dependencies

~1.5–2.2MB
~46K SLoC