CHIBI-FFI(1)

πŸ“¦
version 0.12 Β· 3 versions
, in ubuntu jammy, ubuntu noble, ubuntu stonking

πŸ’– CHIBI-FFI(1) πŸ’–

okay bestie, welcome to the General Commands Manual energy of chibi-ffi ✨


🌸 NAME 🌸

chibi-ffi β€” generate C from Scheme stub files πŸ¦‹


✨ SYNOPSIS ✨

chibi-ffi [-c] [-f cflags] input.stub [output.c]

πŸŽ€ DESCRIPTION πŸŽ€

so basically chibi-ffi reads the C function FFI definitions out of an input file πŸ“– and then outputs the appropriate C wrappers into a file that has the same base name, just with the .c extension (unless you tell it otherwise, bestie, then it does what you say πŸ’…).

then you can take that C file and compile it into a shared library, like:

chibi-ffi file.stub
cc -fPIC -shared file.c -lchibi-scheme

if you pass the -c option it literally attempts compiling the generated C code for you in one step β€” main character behavior fr fr πŸ‘‘. in that case, you can hand it extra flags for the C compiler with the -f option 🫢

the FFI syntax itself is described in the manual over at /usr/share/doc/chibi-scheme/chibi.html, in the "C FFI" section πŸ“š


🌈 AUTHORS 🌈

Alex Shinn πŸ’œ


πŸ› REPORTING BUGS πŸ›

Please report bugs on Github 🫑


πŸ‘€ SEE ALSO πŸ‘€

chibi-scheme(1) πŸ’«


ngl this one's short and sweet and we ate πŸ’… no cap

and that's a wrap bestie!! this was chibi-ffi from 0.9 (fluorine), dated 2020-08-08 πŸŽ€βœ¨ bye icon πŸ¦‹πŸ’–

πŸ“¦ where this page comes from