[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ffi-help: status to 19 Aug 2017

From: Roel Janssen
Subject: Re: ffi-help: status to 19 Aug 2017
Date: Thu, 09 Nov 2017 20:10:59 +0100
User-agent: mu4e 0.9.18; emacs 25.1.1

Matt Wette writes:

> Hi All,
> I am working on a ffi-helper: a program that will read in a C dot-h file and 
> generate a Guile dot-scm file 
> which defines a module to provide hooks into the associated C library.  Goal 
> is to release something in
> Oct 2017 but that date is likely to slip.
> Current shortcomings:
> 1) Guile does not currently handle some types (e..g, long long, uintptr_t).
> 2) Guile does not have support for varargs (e.g., printf(char *, ...) ).
>    I may take a look at this.  One idea I have is to use '... in the call 
> interface spec
>    and use (type . value) pairs in the calls.
> 3) The bytestructures module does not support function declarations.
> 4) ... (probably more)
> Someone asked to have libgit2 converted and this, and some others, turned out 
> to give visibility
> to several limitations and bugs in my C parser.  For one, how #include 
> <foo/bar.h> is interpreted 
> is not specified by the language: it is implementation defined, and I had to 
> track down how libgit2 
> was including files.  I also had to add some GNUC extensions (e.g., asm, 
> statement-block expressions,
> include_next) to the parser and preprocessor.  As one can see from the file 
> listing below, libgit2 
> has a large number of files, and declarations.
> ...

Thanks for creating this!  It seems to be very useful and powerful.

I wanted to try ffi-helper on htslib, but I am confused on how to get
started.  Where does the "compile-ffi" subcommand for "guild" come from?

Kind regards,
Roel Janssen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]