-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add ser/deser from Read/Write #23
Comments
Example of what it could look like: master...Yamakaky:read-write The |
Would you be willing to merge such feature? If not, I won't bother putting it in order. |
Sorry for such a delayed response on this. I do agree that this is a great feature that would be nice to have, but I am not quite sure about the proposed API. |
Do you mean the Result<Result<>>?
|
For the binary serialization especially, it would be nice to be able to serde using the standard Read and Write traits instead of using Vec and slice.
I'm working on interaction between rust and wasm (using wasmer). On the host, I first have to serialize the value to Vec then copy it to wasm. Same thing for deser. With custom Read/Write types, I could do it in one pass.
One other advantage is that you could do streaming deserialization with custom parsers, for example if you want to add all the u32 in a very big file with low constant memory usage.
It can be added as a backward compatible method since Vec is Read + Write. Then, in a future version, the Vec version can be dropped.
The text was updated successfully, but these errors were encountered: