Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add serialisation as an optional feature #18

Merged
merged 1 commit into from
May 4, 2018
Merged

Conversation

alex-mckenna
Copy link
Contributor

This commit introduces an optional feature for serialising and
deserialising CPUID information using serde. Although this may seem
like an unnecessary addition, it can be useful when working with
distributed systems where some jobs require a minimal set of ISA
extensions. By allowing serialisation of the types in the library,
information about computers can be easily shared (without the need for
orphan instances or unnecessary newtype definitions).

This commit introduces an optional feature for serialising and
deserialising CPUID information using serde. Although this may seem
like an unnecessary addition, it can be useful when working with
distributed systems where some jobs require a minimal set of ISA
extensions. By allowing serialisation of the types in the library,
information about computers can be easily shared (without the need for
orphan instances or unnecessary newtype definitions).
@alex-mckenna
Copy link
Contributor Author

Please let me know if there's anything else you require, such as bumping the version number etc.

@gz
Copy link
Owner

gz commented Apr 23, 2018

Thanks, seems like a very useful thing to have! Is it possible to add tests for it to make sure we don't break the feature in the future? It would be great if we can run the existing tests with the deserialized/serialized data.

I mostly want to avoid a case in the future where a new struct is introduced and we miss to add the derives.

@alex-mckenna
Copy link
Contributor Author

No problem, I'll try and get some tests written in the next few days

@gz
Copy link
Owner

gz commented May 4, 2018

I'm going to merge this already since I'm currently writing a simple cpuid tool for the library and I will try and integrate the serialization there as well. In case you get a chance for the tests at some point feel free to open another pull request.

@gz gz merged commit 9584ce7 into gz:master May 4, 2018
@gz
Copy link
Owner

gz commented May 4, 2018

Thanks for the patch!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants