From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: About Guile crypto support Date: Sat, 09 Feb 2013 16:12:08 +0100 Message-ID: <87sj55bjxz.fsf@gnu.org> References: <1359896146.2754.19.camel@Renee-desktop.suse> <871ucvof60.fsf@gnu.org> <1360032192.2754.61.camel@Renee-desktop.suse> <87mwvisqwj.fsf@gnu.org> <878v6yojxg.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1360422741 2272 80.91.229.3 (9 Feb 2013 15:12:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Feb 2013 15:12:21 +0000 (UTC) Cc: guile-devel@gnu.org To: Daniel Hartwig Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Feb 09 16:12:42 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U4C6X-0007Dt-Pw for guile-devel@m.gmane.org; Sat, 09 Feb 2013 16:12:37 +0100 Original-Received: from localhost ([::1]:58365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4C6E-0006tn-Hg for guile-devel@m.gmane.org; Sat, 09 Feb 2013 10:12:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4C6A-0006tf-CM for guile-devel@gnu.org; Sat, 09 Feb 2013 10:12:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4C69-0001ZG-4S for guile-devel@gnu.org; Sat, 09 Feb 2013 10:12:14 -0500 Original-Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:15524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4C68-0001Yz-U1 for guile-devel@gnu.org; Sat, 09 Feb 2013 10:12:13 -0500 X-IronPort-AV: E=Sophos;i="4.84,634,1355094000"; d="scan'208";a="2117892" Original-Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 09 Feb 2013 16:12:08 +0100 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 =?utf-8?Q?Pluvi=C3=B4se?= an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: (Daniel Hartwig's message of "Sat, 9 Feb 2013 09:37:39 +0800") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.83 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15715 Archived-At: Hi, Daniel Hartwig skribis: > By the way, I very much like the conventions used in the GnuTLS > bindings. The enums in particular make a lot of sense for a security > library, with the extreme type safety they provide. I will pursue a > similar approach. Yeah, I think it=E2=80=99s helpful. > One question. With the current state of FFI, do you think it matters > much whether the bulk of the bindings are done in C or FFI? I think it depends on the amount of public C structs, enums, inlines, and constants, and how often they are changed. When there are too many of them and they are subject to change, it might be easier to use C (though that can be worked around from the FFI by calling the C compiler, as in [0].) My impression is that libgcrypt uses mostly opaque pointer types and has a stable API, so the using FFI should be just fine. An issue with the FFI is distros where .la and .so files are only available in the -dev package, because then =E2=80=98dynamic-link=E2=80=99 = won=E2=80=99t work unless that -dev package is installed (as recently discussed on guile-user.) Thanks, Ludo=E2=80=99. [0] http://git.sv.gnu.org/cgit/libchop.git/tree/guile2/chop/internal.scm#n1= 30