This is a little verbose and inefficient.
# 2nd approach
The above is easily done by 'bindgen', which automatically generates rust ffi bindings to C library. By using this, API struct is automatically generated. However, it requires a new dependency: libclang.
# Question
Which of these approaches is more preferable?
Regards,
Hiroyuki Katsura