From cdc1d22ed9ccdf70e01226e6abc9d6992dff7235 Mon Sep 17 00:00:00 2001 From: Doug Anderson444 Date: Sun, 5 Jan 2025 15:57:40 -0400 Subject: [PATCH] add hashers note in readme It's not evidently clear that the hashers need to be explicitly "added" so this readme note is an attempt to correct that. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 8c1f1c7..ffdc666 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,18 @@ Check out the [examples](./examples). - **Libp2p Integration**: Designed to integrate smoothly with libp2p, allowing it to be used in a wide range of decentralized applications. - **Rust Safety and Performance**: Takes advantage of Rust's memory safety guarantees and performance optimizations, making it a robust choice for networked applications. +### Hasher Choices + +Beetswap uses [multihash-codetable](https://docs.rs/crate/multihash-codetable/latest/features), so hashers can be enabled with the corresponding feature: + +```toml +# your crate's Cargo.toml +# Say we want CIDs that used blake3 or sha2 or sha3 +multihash-codetable = { version = "0.1", features = ["blake3", "sha2", "sha3"] } +``` + +Beyond the multihash codetable hashers, other custom hashers can be added, see [multihasher](./src/multihasher.rs) for further details. + ## Contributing We welcome contributions! Please fork the repository and submit a pull request.