emacs-devel
[Top][All Lists]
Advanced

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

Re: DSO-style FFI


From: Ted Zlatanov
Subject: Re: DSO-style FFI
Date: Tue, 08 Oct 2013 15:42:04 -0400
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

On Tue, 08 Oct 2013 11:32:13 -0600 Tom Tromey <address@hidden> wrote: 

Stefan> Well, it doesn't exist for Emacs, so you won't be able to use until you
Stefan> write it.  AFAIK it's been usable for a decade in XEmacs.

Tom> This approach seems very weird to me.
Tom> I don't understand why it is preferable to a libffi-based FFI.
Tom> The main difficulty I see is that now you're either promising an
Tom> internal Emacs ABI -- hard to do -- or you're requiring recompilations
Tom> whenever Emacs changes -- hard on users.

Would any kind of FFI help with data formats?  I don't think so, right?
The foreign function has to take Emacs Lisp_Objects (maybe just strings
and numbers) and package its return data in a Lisp_Object.  So how do we
handle that glue with libffi or anything else without promising some
minimal internal Emacs ABI?

Stefan> One issue will be compatibility of various kinds of dl_open
Stefan> mechanisms on various OSes, but you should find lots of help for
Stefan> that here, so the first version can focus on supporting only
Stefan> GNU/Linux.

Tom> GNU already has libltdl.

I don't know much about libltdl but it seems fairly simple, except for
the requirement to name all exported symbols _modulename_LTX_* which is
a bit annoying.

Ted




reply via email to

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