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

[Other]: Exporting init_login.go #2

Closed
ScottLinnn opened this issue Jun 24, 2023 · 1 comment
Closed

[Other]: Exporting init_login.go #2

ScottLinnn opened this issue Jun 24, 2023 · 1 comment

Comments

@ScottLinnn
Copy link
Collaborator

ScottLinnn commented Jun 24, 2023

What would you like to share?

[UPDATE]
It turned out that we cannot simply export the func contains go interface. We have to cast this “back and forth", that is, implementing a corresponding C++ interface, then passing the implemented functions to Go, then using the passed functions to implement the native Go interface, and finally exporting Go APIs to C++ as a .h file. The details are in the associated branch.


[STALE]
As in #1, the plan is to exporting go APIs into shared libraries that can be called by c++. Since there are many APIs, I'm starting with init_login to verify if this way works, then apply to other APIs.

Currently the challenge is exporting interface type in Go, which is not explicitly documented in cgo.

Additional information

No response

@ScottLinnn
Copy link
Collaborator Author

This experiment is successful and we should move on.

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

When branches are created from issues, their pull requests are automatically linked.

1 participant