{"id":20850576,"url":"https://github.com/multiformats/rust-cid","last_synced_at":"2025-05-15T03:08:16.856Z","repository":{"id":16528045,"uuid":"79384047","full_name":"multiformats/rust-cid","owner":"multiformats","description":"CID in rust","archived":false,"fork":false,"pushed_at":"2025-04-28T17:03:35.000Z","size":935,"stargazers_count":93,"open_issues_count":7,"forks_count":52,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-28T17:38:12.224Z","etag":null,"topics":["cid","crate","ipld","multiformats","rust","rust-cid"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/multiformats.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-18T21:03:12.000Z","updated_at":"2025-04-28T17:00:40.000Z","dependencies_parsed_at":"2023-01-13T18:53:22.059Z","dependency_job_id":"6cb1651d-ee29-474d-a136-9565ed965fe3","html_url":"https://github.com/multiformats/rust-cid","commit_stats":{"total_commits":171,"total_committers":28,"mean_commits":6.107142857142857,"dds":0.5555555555555556,"last_synced_commit":"eb03f566e9bfb19bad79b2691dbcb2541627c0b3"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiformats%2Frust-cid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiformats%2Frust-cid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiformats%2Frust-cid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiformats%2Frust-cid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multiformats","download_url":"https://codeload.github.com/multiformats/rust-cid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264769,"owners_count":22041794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cid","crate","ipld","multiformats","rust","rust-cid"],"created_at":"2024-11-18T03:10:18.177Z","updated_at":"2025-05-15T03:08:11.828Z","avatar_url":"https://github.com/multiformats.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-cid\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)\n[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats)\n[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs)\n[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\n[![Build Status](https://github.com/multiformats/rust-cid/workflows/build/badge.svg)](https://github.com/multiformats/rust-cid/actions)\n[![Crates.io](https://img.shields.io/crates/v/cid?style=flat-square)](https://crates.io/crates/cid)\n[![License](https://img.shields.io/crates/l/cid?style=flat-square)](LICENSE)\n[![Documentation](https://docs.rs/cid/badge.svg?style=flat-square)](https://docs.rs/cid)\n[![Dependency Status](https://deps.rs/repo/github/multiformats/rust-cid/status.svg)](https://deps.rs/repo/github/multiformats/rust-cid)\n[![Coverage Status](https://img.shields.io/codecov/c/github/multiformats/rust-cid?style=flat-square)](https://codecov.io/gh/multiformats/rust-cid)\n\n\u003e [CID](https://github.com/ipld/cid) implementation in Rust.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [Testing](#testing)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Usage\n\n```rust\nuse multihash_codetable::{Code, MultihashDigest};\nuse cid::Cid;\nuse std::convert::TryFrom;\n\nconst RAW: u64 = 0x55;\n\nfn main() {\n    let h = Code::Sha2_256.digest(b\"beep boop\");\n\n    let cid = Cid::new_v1(RAW, h);\n\n    let data = cid.to_bytes();\n    let out = Cid::try_from(data).unwrap();\n\n    assert_eq!(cid, out);\n\n    let cid_string = cid.to_string();\n    assert_eq!(\n        cid_string,\n        \"bafkreieq5jui4j25lacwomsqgjeswwl3y5zcdrresptwgmfylxo2depppq\"\n    );\n    println!(\"{}\", cid_string);\n}\n```\n\nYour `Cargo.toml` needs these dependencies:\n\n```toml\n[dependencies]\ncid = \"0.7.0\"\n```\n\nYou can also run this example from this checkout with `cargo run --example readme`.\n\n## Testing\n\nYou can run the tests using this command: `cargo test --all-features`\n\nYou can run the tests for `no_std` using this command: `cargo test --no-default-features`\n\n## Maintainers\n\nCaptain: [@dignifiedquire](https://github.com/dignifiedquire).\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/multiformats/rust-cid/issues).\n\nCheck out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) 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](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[MIT](LICENSE) © 2017 Friedel Ziegelmayer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiformats%2Frust-cid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiformats%2Frust-cid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiformats%2Frust-cid/lists"}