Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collaborate with ciborium #3

Open
npmccallum opened this issue Dec 16, 2021 · 7 comments
Open

Collaborate with ciborium #3

npmccallum opened this issue Dec 16, 2021 · 7 comments

Comments

@npmccallum
Copy link

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

Can we collaborate rather than building multiple CBOR stacks?

@quininer
Copy link
Owner

Of course, how do you hope to collaborate?

@npmccallum
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

npmccallum commented Dec 16, 2021

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

enarx/ciborium#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
Copy link
Owner

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
Copy link
Author

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

@tqwewe
Copy link

tqwewe commented Sep 3, 2024

Looking at these benchmarks, it seems like cbor4ii turned out to be over 6x faster on average for serialization, and 2.5x faster for deserialization compared to ciborium.

These numbers are pretty substantial, I'm happy there's different alternatives in the ecosystem for some to provide better performance/benefits over others, and without cbor4ii, we'd only have ciborium which is much slower sadly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants