mesalock-linux / mesabox

A collection of core system utilities written in Rust for Unix-like systems (and now Windows)
BSD 3-Clause "New" or "Revised" License
137 stars 19 forks source link

Bindings for calling from C #45

Open Arcterus opened 6 years ago

Arcterus commented 6 years ago

It would be nice to be able to call the utilities from C code. We might limit the user to providing raw file descriptors/raw handles as there's no way to have generic bindings. We could also expose RawObject and have the user give those to the interface so we don't need to worry about the platform differences.

We should look at using cbindgen, but if our interface is small enough it might just be easier to maintain it by hand.