I would suggest creating a low-level wrapper first, directly wrapping each function with the exact same C type arguments, so cint in this case. On top of that you can manually create a cleaner Nim library that uses the underlying wrapper, but converts regular Nim types to the C types and does some other bookkeeping.
- Wrapping C library sdwfrost
- Re: Wrapping C library def
- Re: Wrapping C library sdwfrost