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
HOWTO decode a serialized protobuf (in C) within Rust (prost crate)? #959
Comments
Greetings again! Let me answer my own question above. It turns out that the serialized protobuf contains a lot of '\0', which obviously would mess up your C-string. The following code would then circumvent this situation...
You would then see that Prost (Rust) desearializing your C-serialized protocol-buffers correctly! Cheers! |
@tamama I am glad to see you solved your own issue. Please close the issue when you have no further questions. |
Greetings,
We attempt to do the following:
However, this throws an exception:
"buffer underflow
.What is the best way to achieve this?
Humbly thank everyone in advance!
C:
Rust:
The text was updated successfully, but these errors were encountered: