Skip to content

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

Merged
merged 1 commit into from
Jul 11, 2015

Conversation

pcwalton
Copy link
Contributor

This is behind a Cargo feature to avoid forcing downstream users to
depend on serde. It is needed for Servo IPC to work.

@@ -94,4 +99,20 @@ impl ContentType {
}
}

#[cfg(feature = "serde-serialization")]
Copy link
Contributor

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?

@pcwalton
Copy link
Contributor Author

@reem Done.

@@ -190,6 +214,8 @@ macro_rules! header {
self.fmt_header(f)
}
}

generate_header_serialization!($id);
Copy link
Contributor

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.
@pcwalton
Copy link
Contributor Author

@reem Exported and added the namespace.

@reem
Copy link
Contributor

reem commented Jul 11, 2015

Awesome, LGTM.

reem added a commit that referenced this pull request Jul 11, 2015
Add optional serialization of common types via `serde`.
@reem reem merged commit 7b0f22e into hyperium:master Jul 11, 2015
@pcwalton pcwalton deleted the serde branch July 11, 2015 03:06
bors-servo pushed a commit to servo/servo that referenced this pull request Jul 18, 2015
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 -->
bors-servo pushed a commit to servo/servo that referenced this pull request Jul 18, 2015
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 -->
jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this pull request Jun 12, 2017
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Sep 30, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 1, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 1, 2019
…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
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.

2 participants