[Openmcl-devel] Executing CCL from within C/C++

Josh Hamell jhamell at sift.net
Wed Jul 27 07:39:18 PDT 2016


On 7/25/2016 4:23 PM, R. Matthew Emerson wrote:
> 
>> On Jul 25, 2016, at 6:36 PM, Josh Hamell <jhamell at sift.net> wrote:
>> 
>> We have had great experiences using CCL on a number of different 
>> projects in different capacities, and are now looking at a very
>> niche use case.
>> 
>> Within Linux, is it possible to compile a C/C++ program against 
>> lisp-kernel headers, link against the binary (lx86cl64), and
>> execute arbitrary Lisp code as input char* s-expressions?  Naively,
>> I can peruse the exposed functions using objdump, and would like to
>> believe in a simple way to start the interpreter, load an existing
>> heap image, and run, all through simple C.  This is sort of a
>> "reverse CFFI" - our issue is that the C code needs to be the
>> application entry point, without resorting to separate processes.
> 
> I'm afraid that as currently written, CCL doesn't support this.  That
> is, you can't use CCL as a linkable library as you describe.
> 
Appreciate all of the responses, I will follow the pointers from Gary
and Pascal.

We're currently looking at our options, given the architecture
constraints.  We did briefly try out ECL, but ran into issues verifying
our lisp regression test suite.  As it stands, we may end up with the
shell call Ron suggested, or some other form of inter process
communications such as [domain] sockets.

Thank you for the prompt and thorough responses,
Josh



More information about the Openmcl-devel mailing list