4 ms·
Guile is designed to be an embedded language, so in theory you could write a small C wrapper to set up the Guile environment and load your scheme program... I'm
by bcg1 11y ago
Guile is designed to be an embedded language, so in theory you could write a small C wrapper to set up the Guile environment and load your scheme program... I'm not sure if libguile can be statically though
The VM written in C that runs the bytecode actually relatively small... most of Guile, including the interpreter and the compilers, are written in Guile itself and run on top of the VM. Those components are compiled object files... they use the ELF format but are not actually executables. IIRC code is loaded by memory mapping the files and Guile has its own way of linking them. I supposed that embedding these files into an executable would require a different mechanism of linking which I am not sure exists. Maybe it does, I just haven't dug that far down into it. The compiler and interpreter take forever to compile BTW... it is definitely preferable to just get Guile from your distro if you can.