Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Ability to derive Serialization to/from IPLD compatible format #417

Open
semtexzv opened this issue Oct 18, 2020 · 1 comment
Open

Ability to derive Serialization to/from IPLD compatible format #417

semtexzv opened this issue Oct 18, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@semtexzv
Copy link

Is your feature request related to a problem? Please describe.
It'd be nice to be able to derive serializing to and from IPLD without having to manually write that code.

Describe the solution you'd like
Adopt https://github.com/ipfs-rust/rust-ipld, or develop own capability

Describe alternatives you've considered
Using other libraries, developing my own translation layer between structs and IPLD.

Additional context
I'm not sure what the situation is with different implementations, but from a perspective of a developer trying to build some custom protocols running side by side with IPFS node the state of things is very confusing. The ipfs-embed is not compatible with other IPFS clients, does not provide pubsub functionality. And the rust-ipfs does not provide tools to work with IPLD in ergonomic way.

Please let me know, what's the state and direction of this feature, I'd be glad to work on it, if needed.

@semtexzv semtexzv added the enhancement New feature or request label Oct 18, 2020
@koivunej
Copy link
Collaborator

Hi and thanks for the request!

Could you confirm that this is about the missing ipld derive or what is now https://github.com/ipfs-rust/rust-ipld/tree/master/dag-cbor-derive? It was scoped our during #295 when we needed to pull the dependency in, in order to finally get to #356. The breaking changes in multiformat repos are a bit of an issue for trying to get to compatibility in really short term. As a short term workaround I would assume direct use of rust-ipld features can be used to produce a Box<[u8]> or similar with which we can interop.

Please let me know, what's the state and direction of this feature, I'd be glad to work on it, if needed.

More exploratory work in the IPLD space would be very much welcome! To be honest I must be quite out of date with the latest spec work, but at least for a while it seemed like dag-cbor might be becoming a subset of cbor the wider ecosystem cbor support might have become usable as only single tag (cids) was allowed. With this, perhaps the larger serde ecosystem could be used. As for other ideas I've been floating around related to this: I think striving to make the ipld functionality detached from any of the IO similar to ipfs-unixfs, but this mostly matters for anything multi-block.

I'd also be interested to hear more about your use case.

You also wrote:

[...] does not provide pubsub functionality

Please be aware of #132 (comment) where the gossipsub 1.1 is currently being worked on at libp2p/rust-libp2p#1720.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants