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

Do you have C bindings #408

Closed
Ergus opened this issue Apr 27, 2022 · 4 comments
Closed

Do you have C bindings #408

Ergus opened this issue Apr 27, 2022 · 4 comments

Comments

@Ergus
Copy link

Ergus commented Apr 27, 2022

Hi:

I have seen that you have several bindings for different languages. Surprisingly I don't see binding, which is usually the basic and simpler to expose bindings for other languages like Python, Fortran or use tools like popen, python's ctypes and so on.

Are you planning to create C bindings? Else (from my absolute ignorance) what C++ specific feature you require that made you implement the C++ binding but not the C as usually the multy language libraries do

@mxinden
Copy link
Member

mxinden commented Apr 27, 2022

Are you planning to create C bindings?

I am not aware of such effort. Though I have not been involved in any of the bindings work.

@Ergus
Copy link
Author

Ergus commented Apr 27, 2022

Are you planning to create C bindings?

I am not aware of such effort. Though I have not been involved in any of the bindings work.

I am not sure if there is a way to do a feature request or so for this... in general I think that the C core and then create bindings for all the other languages is a simpler and more scalable approach to maintain in the long path than maintaining individual ports, but sadly I don't have time to implement such thing myself days from the C++ version.
I see that there is some python port in the repo, so probably there is already some C code exposed in order to call it from Python bindings... if so, then maybe it only needs some documentation?

@aschmahmann
Copy link
Contributor

aschmahmann commented Apr 27, 2022

If you just want C bindings couldn't you add them as an interop layer on top of rust-libp2p? There seems to have been some discussion on this in libp2p/rust-libp2p#1985.

Perhaps unjustified, but I also suspect that as folks work on wasm bindings for rust-libp2p (libp2p/rust-libp2p#2617) they'll end up exploring a similar style for exportable interfaces that could be used for C FFI (cc @mriise)

@marten-seemann
Copy link
Contributor

Closing since this is not specs-related.

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

4 participants