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

Plain C interface / Rust bindings #17

Open
unhammer opened this issue Feb 12, 2019 · 0 comments
Open

Plain C interface / Rust bindings #17

unhammer opened this issue Feb 12, 2019 · 0 comments

Comments

@unhammer
Copy link
Member

unhammer commented Feb 12, 2019

I see neither Rust nor plain C on http://swig.org/ 's list of "Exits" (there was a 2012 GsoC project on a C target, but I don't see any mention that it was ever merged and it was listed as experimental 14 days ago).

mbrubeck says bindgen might be able to create bindings from rust to C++: https://rust-lang.github.io/rust-bindgen/cpp.html – there are some caveats there, so I guess it's a matter of Try It And See for someone who's good with Rust.

So the alternatives seem to be:

  1. manually write a C interface with extern C etc. It'd work, but be annoying to maintain two sets of interfaces (maybe less typesafe than SWIG too)
  2. use SWIG, if/when the C target works and bind to C from Rust
  3. use Rust bindgen, if that works (no C interface though)

(based on conversation here https://giella.zulipchat.com/#narrow/stream/129301-gramcheck/topic/libdivvun.20C.20interface )

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

1 participant