From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Roel Janssen Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: ffi-help: status to 19 Aug 2017 Date: Thu, 09 Nov 2017 20:10:59 +0100 Message-ID: <878tfffet8.fsf@gnu.org> References: <25A19914-FADD-46DC-AEFA-F290210C33DF@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1510254695 1233 195.159.176.226 (9 Nov 2017 19:11:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Nov 2017 19:11:35 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.1.1 Cc: Guile User , guile-devel To: Matt Wette Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Nov 09 20:11:28 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCsEZ-0008Bs-3d for guile-devel@m.gmane.org; Thu, 09 Nov 2017 20:11:27 +0100 Original-Received: from localhost ([::1]:38433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCsEZ-0008OS-Qp for guile-devel@m.gmane.org; Thu, 09 Nov 2017 14:11:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCsEO-0008Kj-Vw for guile-devel@gnu.org; Thu, 09 Nov 2017 14:11:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCsEO-0002n8-1s for guile-devel@gnu.org; Thu, 09 Nov 2017 14:11:16 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCsEJ-0002lA-JN; Thu, 09 Nov 2017 14:11:11 -0500 Original-Received: from ip112-245-209-87.adsl2.static.versatel.nl ([87.209.245.112]:51075 helo=yellowstone) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eCsEJ-0006EE-2G; Thu, 09 Nov 2017 14:11:11 -0500 In-reply-to: <25A19914-FADD-46DC-AEFA-F290210C33DF@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19376 gmane.lisp.guile.user:14234 Archived-At: 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 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