-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add optional serialization of common types via serde
.
#603
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
Conversation
e76b590
to
e5f5801
Compare
@@ -94,4 +99,20 @@ impl ContentType { | |||
} | |||
} | |||
|
|||
#[cfg(feature = "serde-serialization")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else looks great, but can we move this into the definition of the header
macro, so that we automatically get serialization for most headers?
@reem Done. |
@@ -190,6 +214,8 @@ macro_rules! header { | |||
self.fmt_header(f) | |||
} | |||
} | |||
|
|||
generate_header_serialization!($id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this doesn't work without exporting generate_header_serialization
too, since the expansion is in another namespace.
We can just export it with a __
prefix like __hyper_deref
.
This is behind a Cargo feature to avoid forcing downstream users to depend on `serde`. It is needed for Servo IPC to work.
@reem Exported and added the namespace. |
Awesome, LGTM. |
Add optional serialization of common types via `serde`.
compositing: Make the constellation messages serializable. Same idea as before. This depends on: * servo/euclid#94 * hyperium/hyper#603 r? @jdm <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6593) <!-- Reviewable:end -->
compositing: Make the constellation messages serializable. Same idea as before. This depends on: * servo/euclid#94 * hyperium/hyper#603 r? @jdm <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6593) <!-- Reviewable:end -->
…ializable (from pcwalton:constellation-ipc); r=jdm Same idea as before. This depends on: * servo/euclid#94 * hyperium/hyper#603 r? @jdm Source-Repo: https://github.com/servo/servo Source-Revision: 2f4bdc6ad631dc56b64622e3390943b59270b3ae
…ializable (from pcwalton:constellation-ipc); r=jdm Same idea as before. This depends on: * servo/euclid#94 * hyperium/hyper#603 r? jdm Source-Repo: https://github.com/servo/servo Source-Revision: 2f4bdc6ad631dc56b64622e3390943b59270b3ae UltraBlame original commit: 2564d34df7d27ad820f50ea42fdbb4667faab300
…ializable (from pcwalton:constellation-ipc); r=jdm Same idea as before. This depends on: * servo/euclid#94 * hyperium/hyper#603 r? jdm Source-Repo: https://github.com/servo/servo Source-Revision: 2f4bdc6ad631dc56b64622e3390943b59270b3ae UltraBlame original commit: 2564d34df7d27ad820f50ea42fdbb4667faab300
…ializable (from pcwalton:constellation-ipc); r=jdm Same idea as before. This depends on: * servo/euclid#94 * hyperium/hyper#603 r? jdm Source-Repo: https://github.com/servo/servo Source-Revision: 2f4bdc6ad631dc56b64622e3390943b59270b3ae UltraBlame original commit: 2564d34df7d27ad820f50ea42fdbb4667faab300
This is behind a Cargo feature to avoid forcing downstream users to
depend on
serde
. It is needed for Servo IPC to work.