We need a CID/multihash library for using both inside and outside of smart contracts, from rust. We currently have two options but neither of them are optimal.
Why Now
Unfortunately, these are base types around which we'll build the rest of the system, so we'd like to nail them down now instead of having to refactor later.
Done
We have a single multihash/cid library:
Supports nostd.
Lives in the github.com/multiformats org.
Used by the ecosystem (i.e., PRs exist to update uses in forest & rust-libp2p).
Ideally: Can be used without allocations.
Ideally: Supports seamlessly abstracting over different sized CIDs.
Details
All implementations:
Maximum size specified in the type (efficient in some cases, but it makes some patterns difficult).
Motivation
We need a CID/multihash library for using both inside and outside of smart contracts, from rust. We currently have two options but neither of them are optimal.
Why Now
Unfortunately, these are base types around which we'll build the rest of the system, so we'd like to nail them down now instead of having to refactor later.
Done
We have a single multihash/cid library:
Details