(have we had this topic yet?) I wrote some nontrivial bindings for a C library recently (including callbacks) and can talk about how to do that.