Skip to content
CID in rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src fear:FromStr support added (#15) Mar 19, 2019
.gitignore feat: first implementation Jan 29, 2017
.travis.yml feat: first implementation Jan 29, 2017
Cargo.toml chore: move from ipld -> multiformats Nov 21, 2018 chore: move from ipld -> multiformats Nov 21, 2018


Travis CI

CID implementation in Rust.

Table of Contents


First add this to your Cargo.toml

cid = "*"

Then run cargo build.


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);


Captain: @dignifiedquire.


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.


MIT © 2017 Friedel Ziegelmayer

You can’t perform that action at this time.