codon icon indicating copy to clipboard operation
codon copied to clipboard

Can I use codon with Cffi?

Open nile649 opened this issue 3 years ago • 1 comments

I didn't find any discussion group.

nile649 avatar Dec 12 '22 01:12 nile649

You can call C functions with from C import in Codon (docs). See also "Other types and features" for how to express some C types in Codon. Generally calling C functions is very seamless/efficient (e.g. no object conversions are needed) since it's all LLVM-based anyway.

arshajii avatar Dec 13 '22 15:12 arshajii

I am closing this issue for now.

You can (if you really want) use cffi via from python import ctypes, although this is highly discouraged---please use Codon's native from C import if possible.

inumanag avatar Dec 18 '22 04:12 inumanag