The cid stuff has been implemented and initial support for it is being landed in our 0.4.5 release (which will be soon, hopefully release candidate within a week).
With that and IPLD, you can craft arbitrary objects in JSON or CBOR (theres a 1 to 1 mapping, objects are stored as cbor) and work with them in ipfs. For example, i could make an object that looks like:
{
"Contents": {"/":"QmHashOfPkgContents"},
"Compression": "bzip2",
"NarSize": 12345,
"References": {
"foo": {"/": "QmHashOfFoo"},
"bar": {"/": "QmHashOfBar"}
},
"Signature": "signature info, or a link to the signature",
}
(please excuse my attempt at recreating a nar file in rough json).This object could then be put into ipfs with:
cat thing.json | ipfs dag put
And you would get an ipld object that you can move around in ipfs, and do fun things like: ipfs get <thatobjhash>/Contents
to download the package contents, or: ipfs get <thatobjhash>/References/foo
to get the referenced package (or open that hash/path in an ipfs gateway to browse the package graph for free in your browser :) )