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

Does this facilitate C - Go communication? #27

Closed
OliverEvans96 opened this issue Apr 16, 2020 · 4 comments
Closed

Does this facilitate C - Go communication? #27

OliverEvans96 opened this issue Apr 16, 2020 · 4 comments

Comments

@OliverEvans96
Copy link

Hi,

Looks like a great package! I imagine that the primary use case is go-like channels within a C program, but I'm wondering - have you actually mirrored the Go datastructure exactly? Is it possible to use CGO to embed a C program using this library inside of Go and actually send and receive on the same channel from both languages?

Thanks!
Oliver

@tylertreat
Copy link
Owner

have you actually mirrored the Go datastructure exactly? Is it possible to use CGO to embed a C program using this library inside of Go and actually send and receive on the same channel from both languages?

No, unfortunately this isn't possible nor is it the intention of this package. This is just an implementation of the Go channel API in C. It doesn't interop. Would be a neat idea though!

@OliverEvans96
Copy link
Author

@tylertreat - do you have any idea what would be required to do interop?

@tylertreat
Copy link
Owner

I'm not entirely sure, but this might give you an idea: https://github.com/matiasinsaurralde/cgo-channels

@OliverEvans96
Copy link
Author

Thanks a lot!

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

No branches or pull requests

2 participants