[cffi-devel] The use of wrappers in deployed applications
Luís Oliveira
luismbo at gmail.com
Sun Feb 1 13:09:33 UTC 2009
On Fri, Jan 30, 2009 at 6:05 AM, John Fremlin <jf at msi.co.jp> wrote:
>> I strongly recommend calling cffi:load-foreign-library at run time
>> only (never before delivery). That gives you control over how the
>> library is loaded on startup (for example reporting errors to the
>> user).
[...]
> Luis, would you consider a patch to add a special variable
> *cffi-wrapper-delay-load* which would set a special mode for the
> generated wrapper.lisps?
I'd rather solve the problem in a more general way. (And document it
in the manual.) Every library out there calls LOAD-FOREIGN-LIBRARY at
load-time. What can we do to make that work in delivery-friendly way?
Not using absolute paths is one way, but is that not enough for the
wrapper libs?
Perhaps CFFI can unload the foreign libraries before delivery and take
care of reloading them later, thereby providing
*FOREIGN-LIBRARY-DIRECTORIES* and, eventually, error-handling hooks?
--
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
More information about the cffi-devel
mailing list