
Bindgen – Rust tool for generating C bindings - ingve
https://jvns.ca/blog/2017/12/21/bindgen-is-awesome/
======
vvanders
Bindgen is really awesome, makes is dead-simple to integrate with existing
libraries.

That said the only place where there's a little friction is around macros
since they need to be evaluated in context. However it's easy to use another
header to declare them as static const/discrete function and then bindgen
picks them up just fine.

------
alexnewman
Big fan of bindgen. Two libraries i created already use it \- rustrpg (rust
for postgres) \- torch-rust

------
steveklabnik
A great post from Julia, as always :)

Bindgen has some support for C++ stuff too! Firefox uses it pretty heavily.

~~~
twic
The C++ support is impressive. It doesn't work well enough to handle
"idiomatic" C++ libraries, with templates all over the place, but that it
works as well as it does is really impressive.

------
baq
reverse - cbindgen - seems quite useful, too! i didn't know it existed until
this post.

------
equalunique
Another excellent post by Julia Evans.

