quininer / cbor4ii

CBOR: Concise Binary Object Representation
MIT License
54 stars 5 forks source link

Collaborate with ciborium #3

Open npmccallum opened 2 years ago

npmccallum commented 2 years ago

https://github.com/enarx/ciborium/

Can we collaborate rather than building multiple CBOR stacks?

quininer commented 2 years ago

Of course, how do you hope to collaborate?

npmccallum commented 2 years ago

No idea. But I'd rather have one really good CBOR stack than multiple incomplete ones.

Was there some defect or design considerations in ciborium that lead to an alternate implementation?

quininer commented 2 years ago

There are two missing things in ciborium that prompted me to develop this crate

  1. ciborium has not exposed the Serializer api for a long time
  2. ciborium does not support zero-copy decode.
npmccallum commented 2 years ago

There are two missing things in ciborium that prompted me to develop this crate

  1. ciborium has not exposed the Serializer api for a long time

https://github.com/enarx/ciborium/issues/18

We have expressly supported exposing these. But nobody has stepped up to finish it. Would you like to?

  1. ciborium does not support zero-copy decode.

We'd love to have this feature. Although one should note that not all CBOR wire values can be zero-copy decoded.

Would you be willing to contribute these features to ciborium?

quininer commented 2 years ago

I'm not sure how easy this is. when I tried to make ciborium support zero copy decode, I realized that it needed to be changed quite a bit. considering communication costs, I choose to implement my own library.

npmccallum commented 2 years ago

@quininer If this is the biggest blocker, I'm happy to help you implement it.