STklos
STklos copied to clipboard
Split stklos into lib and binary (so STklos will be embeddable)
So we can have an embedable libstklos
in the near future. A small patch, as you can see!
I'll work on an example program embedding STklos.
Pending:
- Don't clutter
$PREFIX/include
withsocket.h
,extraconf.h
etc. - Maybe have three targets,
install-base
,install-dev
andinstall
? (Not sure if this is needed)
One more thing: the binary can't find the library and I had to set LD_LIBRARY_PATH manually. I think there is a way to fix this.
An I'd have to study the STkos boot process. I though I knew how it worked, but it's more complicated than my initial understanding. The idea would be to have something similar to a boot image, but without the REPL, just so the user can load the basic libraries.
I haven't given up on this :) I'll try to work on it later... The tricky part is to adjust the boot process.
One more thing: the binary can't find the library and I had to set LD_LIBRARY_PATH manually. I think there is a way to fix this.
The first versions of STklos used this approach (look at the file etc/simple-stklos.c
which is here from the beginning, and permitted to use a customized boot image). However, I gave up with this approach, because it was difficult to have a portable way to test STklos without installing it, ans it was a real headache. In particular, LD_LIBRARY_PATH
didn't seem to be universally used to denote the places where the library are placed. At the time, STklos was available on a larger number of systems .
Things are a little simpler now, but at least on MacOs, the name of the variable is different (DYLD_LIBRARY_PATH
is I remember), and is not passed to subprocesses depending on the security options the user has set. I think that it is important that the make test
can be run as a normal user before running make install
. However, if you have a solution, it would be really really cool.
So we can have an embedable
libstklos
in the near future.
I'm surprised because:
https://github.com/egallesio/STklos/blob/590c727038b2790ff047008035072f031eb399d3/README.md?plain=1#L14-L15
Is the README wrong?
Is the README wrong?
I think @egallesio forgot to remove that part of the README. As he mentioned in this PR, STkos used to be embeddable.
By the way, he explained what the problem is, and if there is a solution then STklos cold be embeddable again...
Is the README wrong?
For now, it is. I have suppressed this sentence from the README. I'll reintegrate it when this will be again possible.
This will be done after v2.00.