1 unstable release

Uses old Rust 2015

0.3.1 Aug 19, 2019

#7 in #multihash

Download history 19/week @ 2023-10-28 18/week @ 2023-11-04 19/week @ 2023-11-11 20/week @ 2023-11-18 26/week @ 2023-11-25 10/week @ 2023-12-02 15/week @ 2023-12-09 17/week @ 2023-12-16 18/week @ 2023-12-23 8/week @ 2023-12-30 19/week @ 2024-01-06 19/week @ 2024-01-13 13/week @ 2024-01-20 13/week @ 2024-01-27 11/week @ 2024-02-03 21/week @ 2024-02-10

61 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.6–2.3MB
~48K SLoC