-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: support for custom (de)serializer #156
Merged
Merged
Commits on Apr 28, 2023
-
feat: support for custom (de)serializer
This commit introduces the following changes to Zenoh-Flow: 1. types used within a Zenoh-Flow application do not have to implement the (cumbersome) `ZFData` trait; instead, 2. the types used must be `Send + Sync + 'static`, 3. an Output must know how to serialize the provided type `T` and, respectively, an Input must know how to deserialize bytes into `T`. With these changes, any SerDe compatible data serialization format is supported as well as, for instance, ProtoBuf. In terms of API, the major difference is how the Input and Output are obtained: ```rust input: inputs .take("in", |bytes| todo!("Provide your deserializer here")) .expect("No input called 'in' found"), output: outputs .take("out", |data| todo!("Provide your serializer here")) .expect("No output called 'out' found"), ```
Configuration menu - View commit details
-
Copy full SHA for 3a832a6 - Browse repository at this point
Copy the full SHA 3a832a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for efec7ae - Browse repository at this point
Copy the full SHA efec7aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 80bee0d - Browse repository at this point
Copy the full SHA 80bee0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61cf6e5 - Browse repository at this point
Copy the full SHA 61cf6e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 25943b4 - Browse repository at this point
Copy the full SHA 25943b4View commit details -
feat: InputBuilder and OutputBuilder
Instead of having the methods `take` and `take_raw` on the Inputs and Outputs, that give, respectively, the Typed and Raw Input/Output, this commit removes the `take_raw` variant and introduces builders. The builders can be turned into the Typed or Raw variant using the corresponding methods: `build_typed` and `build_raw`.
Configuration menu - View commit details
-
Copy full SHA for f238d72 - Browse repository at this point
Copy the full SHA f238d72View commit details -
Configuration menu - View commit details
-
Copy full SHA for 253a8f0 - Browse repository at this point
Copy the full SHA 253a8f0View commit details -
feat: reuse buffer when serializing (#160)
* feat: reuse buffer when serializing This commit tries to minimize the number of allocations performed when serializing data. For this end, the connector and built-in Source now create internal `Vec<u8>` buffers that are reused whenever a message is serialized. This change should hopefully improve performance. * doc: fix typos
Configuration menu - View commit details
-
Copy full SHA for b6c669c - Browse repository at this point
Copy the full SHA b6c669cView commit details
Commits on May 2, 2023
-
refacto: renamed
build_raw
andbuild_typed
toraw
andtyped
Signed-off-by: Julien Loudet <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f9743d3 - Browse repository at this point
Copy the full SHA f9743d3View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.