Subject: [clisp-list] stand-alone executable (was: A general query on the virtual machi ne)

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Mon Apr 15 02:33:04 2002

Hi,

Scott Williams wrote:
> would work to
> make stand-alone executables (ie, no other files needed for 
> the program to

If that's all you're after, why don't you try the following:

ls -l lispinit.mem -> e.g. 987654 bytes

mymem.c:
char mymem[987654] = {
#include "mymem.h"
};
Use dd or some Lisp code to produce mymem.h from lispinit.mem in a format readable by the C compiler. If you know assembly, generate assembly code instead (much faster). If you know object files (or have an API), create one directly (faster again).

Then add a little C code to CLISP to read its .mem file from the mymem array instead.
Disable reading .clisprc (or language or any other files). Add your .so and whatever modules. Link everything statically for the usual fake security reasons.

Please report how this works. It should. I don't know if somebody ever tried this. Interest in stand-alone seems low outside the security area these days.

[Sounds like one of these "let's dream" threads. See the empty http://sourceforge.net/projects/clisp Task Manager about "Native Compilation" or "JVM Compilation".]

Regards,
	Jorg Hohle.