3 ms·
Bindgen – Rust tool for generating C bindings
- vvanders 9y agoBindgen 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 9y agoBig fan of bindgen. Two libraries i created already use it - rustrpg (rust for postgres) - torch-rust
- steveklabnik 9y agoA great post from Julia, as always :) Bindgen has some support for C++ stuff too! Firefox uses it pretty heavily.
- twic 9y agoThe 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 9y agoreverse - cbindgen - seems quite useful, too! i didn't know it existed until this post.
- equalunique 9y agoAnother excellent post by Julia Evans.