-
Notifications
You must be signed in to change notification settings - Fork 86
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
Serialization without prefix length #202
Comments
Yes! Not only |
Hey @JalonWong just letting you know that I opened a PR here: #208 - Please take a look and give your feedback if possible, thanks! 🙏 |
The PR is pretty good. |
Thanks! I added it with the appropriate tests in the PR, if there is anything else let me know on the PR thread 🙏 |
FYI: You can serialize / deserialize protos without length prefixes like this: let mut buf = Vec::new();
let mut writer = Writer::new(&mut buf);
MyMessage::default().write_message(&mut writer)?;
let mut reader = BytesReader::from_bytes(&buf);
let proto = MyMessage::from_reader(&mut reader, &buf)?; |
Hi! Since this seems to be a common stumbling block for new users, would you guys prefer:
I personally prefer 1), since we will most likely have breaking changes already from #235 and #240. |
I have the same issue when I want to use protocol buffers between rust and typescript, protobufjs decoded error because the prefix length. |
Why do
serialize_into_slice()
anddeserialize_from_slice()
add an an extra length before the data? This seems to be incompatible with the official library.Can I add some new functions like
serialize_into_slice_without_len()
anddeserialize_from_slice_without_len()
?The text was updated successfully, but these errors were encountered: