[CM] On FFI bindings

Woody Douglass wdouglass at carnegierobotics.com
Thu Oct 22 04:48:45 PDT 2020


Christos,

I have several C extensions i've written, and i give all of them an entry point with this prototype

void install_scheme_objects(s7_scheme *s);

then, I load those extensions with

(load filename (sublet (curlet) 'init_func 'install_scheme_objects))

the install_scheme_objects function usually sets up an envrionment and adds its functions there

Hope this helps,
Woody Douglass


On 2020-10-21 20:08:55-04:00 cmdist-bounces at ccrma.Stanford.EDU wrote:

Hi all,
In my s7-imgui project I have bindings for some different libraries.
- to get an open/save dialog
- GUI functionality
- std <regex> (C++11) operations
and so on. Soon I'd like to make each of these bindings a dynamic library where one could load like (load-extension ..) and get acces to these bindings.
I think it'd be good to decide on a suggested API for these. How one should provide an s7 environment via a C API.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20201022/2bb9a6bd/attachment.html>


More information about the Cmdist mailing list