I want to ditch the Nar format as soon as possible. IPFS's unixfs format is too rich however.<p>When will the IPFS people finish up <a href="https://github.com/ipld/cid" rel="nofollow">https://github.com/ipld/cid</a> so we can link whatever content addressable data we want?<p>I'd use git tree objects, despite SHA-1, because it's widely supported. Or do a format identical tree objects but with the IPFS's multihash and SHA-1 banned.<p>Point is, underlying protocol should be agnostic to hashing scheme, we should have a trait/type class like<p><pre><code> /// Node in try
trait Payload {
type Hash: HashingTrait;
fn unpack(Payload) -> (Vec<u8>, Set<Hash>);
fn pack(Vec<u8>, Set<Hash>) -> Payload;
// Implement either and get the other for free!
fn hash_packed(p: Payload) -> Hash { hash_unpacked(packed(p))
fn hash_unpacked(p: (Vec<u8>, Set<Hash>)) -> Hash { hash_packed(packed(p)) }
}
</code></pre>
any `(Hash, Payload)` than can define a `(binary blob, Set<Hash>) -> Hash` and Payload function should work.