From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Amirouche Newsgroups: gmane.lisp.guile.user Subject: Re: ffi helper Date: Thu, 23 Mar 2017 18:43:25 +0100 Message-ID: <7cbcd0a1-c7f5-b00c-6cb5-68f2b36df0bc@hypermove.net> References: <96434CF4-E3F9-4410-82B6-9EB8DEE130B9@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1490291062 27219 195.159.176.226 (23 Mar 2017 17:44:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Mar 2017 17:44:22 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Mar 23 18:44:18 2017 Return-path: Envelope-to: guile-user@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 1cr6mQ-0005va-V0 for guile-user@m.gmane.org; Thu, 23 Mar 2017 18:44:11 +0100 Original-Received: from localhost ([::1]:57694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cr6mW-0000RU-Ru for guile-user@m.gmane.org; Thu, 23 Mar 2017 13:44:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cr6lk-0000Pd-PP for guile-user@gnu.org; Thu, 23 Mar 2017 13:43:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cr6lg-0004H7-Ss for guile-user@gnu.org; Thu, 23 Mar 2017 13:43:28 -0400 Original-Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:34862) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cr6lg-0004Gh-Mr for guile-user@gnu.org; Thu, 23 Mar 2017 13:43:24 -0400 Original-Received: from mfilter2-d.gandi.net (mfilter2-d.gandi.net [217.70.178.140]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 9D66AFB882 for ; Thu, 23 Mar 2017 18:43:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter2-d.gandi.net Original-Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter2-d.gandi.net (mfilter2-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id nM15tk9SNIck for ; Thu, 23 Mar 2017 18:43:20 +0100 (CET) X-Originating-IP: 82.239.61.147 Original-Received: from [192.168.0.7] (aul93-4-82-239-61-147.fbx.proxad.net [82.239.61.147]) (Authenticated sender: amirouche@hypermove.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 2777CFB8C7 for ; Thu, 23 Mar 2017 18:43:19 +0100 (CET) In-Reply-To: <96434CF4-E3F9-4410-82B6-9EB8DEE130B9@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4b98:c:538::198 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13571 Archived-At: Héllo Matt! Le 09/03/2017 à 03:06, Matt Wette a écrit : > I’m now working on a FFI helper based on the nyacc C99 parser. > My current prototyping goal is to autogenerate the functions for cairo.h. > I will assume going with scheme-bytestructures. > I’ll keep this list posted on progress. > > Matt Let me know, when it will be possible to try. FWIW I started some bindings for libgit2 but I got stuck... Basically because it's overwhelming. I got stuck trying to bind "git clone" [1]. Here is the signature: |int git_clone(git_repository **out, const char *url, const char *local_path, const git_clone_options *options);| It requires a double pointer "out". Then it also has a "options" which is a "git_clone_options" struct which in turns requires |another struct named git_checkout_options. I am still not sure how to declare function pointers in guile-bytestructures and libgit2 make heavy use of those. | It's located at https://gitlab.com/amirouche/guile-git Maybe it's too complicated, instead I can try to regenerate my wiredtiger bindings [2]. What is specific about it is that it has functions pointers in struct. Tx:) [1] https://libgit2.github.com/libgit2/#HEAD/group/clone/git_clone [2] which has unit tests, so it will be "easy" to know if it works or not