Skip to content
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

[question] init(protobuf: ) #1

Closed
tanner0101 opened this issue Sep 22, 2016 · 2 comments · Fixed by #5
Closed

[question] init(protobuf: ) #1

tanner0101 opened this issue Sep 22, 2016 · 2 comments · Fixed by #5

Comments

@tanner0101
Copy link

This library looks awesome!

I was wondering if you could explain briefly how Swift structs are initialized with Data. There must be some magic going on there to make it dynamic.

Thanks!

@tbkka
Copy link
Collaborator

tbkka commented Sep 22, 2016

It's not dynamic at all, actually. To understand it more completely, you should probably start with Google's protobuf documentation:

https://developers.google.com/protocol-buffers/

You can get some insight into how the Swift support works from the documentation for the protoc plugin:

https://github.com/apple/swift-protobuf-plugin/blob/master/GENERATED_CODE.md#serialization-support

@tbkka tbkka closed this as completed Sep 22, 2016
@tanner0101
Copy link
Author

Oh I see, generated code. Makes sense. Thank you. :)

tbkka pushed a commit to tbkka/swift-protobuf that referenced this issue Dec 6, 2016
ahmed-osama-saad pushed a commit to ahmed-osama-saad/swift-protobuf that referenced this issue Oct 12, 2023
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 a pull request may close this issue.

2 participants