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

Rust Plugin Bindings: Bytes #1775

Merged
merged 2 commits into from
Jun 15, 2023
Merged

Rust Plugin Bindings: Bytes #1775

merged 2 commits into from
Jun 15, 2023

Conversation

namesty
Copy link
Collaborator

@namesty namesty commented May 30, 2023

Needed for polywrap/rust-wrap-client#59

In Rust, bytes and an array of uint8 are not different types, they're all just Vec<u8>. But in the msgpack specification, they are indeed different (see bin family). Therefore, when deserializing a bin msgpack type and trying to coerce it to Vec<u8>, a mismatch error gets thrown (3Hren/msgpack-rust#249).

This PR adds annotations to use serde_bytes serialization/deserialization as recommended in the rmp_serde issue thread.

@dOrgJelli dOrgJelli merged commit 1a46cb7 into origin-dev Jun 15, 2023
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.

3 participants