Bindings for c-ares
, mostly autogenerated by rust-bindgen
.
To create ffi.rs
, do this:
bindgen -l cares -match ares -o src/ffi.rs c-ares/ares.h
... and then:
unsafe
to the function type declarations for ares_sock_state_cb
, ares_callback
, ares_host_callback
, ares_nameinfo_callback
, ares_sock_create_callback
ares_fds
and ares_process
fd_set
.The script generate-ffi.sh
automates this process.