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

Implements CborPacked, a more compressed variant of CBOR. #849

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

ctm
Copy link
Contributor

@ctm ctm commented Jan 7, 2020

No description provided.

@jstarry jstarry merged commit 5d27094 into yewstack:master Jan 7, 2020
@ctm
Copy link
Contributor Author

ctm commented Jan 10, 2020

This is a heads-up that we may want to change or replace CborPacked before the next version of yew is released.

Starting with serde_cbor 0.10, using to_vec_packed is no longer as compact for enums where the variant contains data. This was changed so that serde_cbor's format is now the serde preferred external tag format.

It is, however, possible to get the 0.9 level of compactness, and for my project, that's what I want. I suspect that others who would use CborPacked would want this as well, and that very few would want what we currently get when using to_vec_packed, because all enum variants that carry data will have the name of the variant transmitted.

Although serde_cbor 0.10 was released in July, I only noticed this issue a couple days ago due to me not having looked at any serialized data since upgrading to 0.10. I reported what appeared to me to be a regression and now that I better understand the situation, I'm going to submit a PR or two to help clarify the situation, but it looks like we'll probably not want to use to_vec_packed.

Once I know what's accepted over there, I'll propose a way to integrate it over here. I'm only mentioning it now, just in case there's a new release of yew imminent, in which case you may want to revert this before such a release so that the API doesn't churn as we nail things down.

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

Successfully merging this pull request may close these issues.

2 participants