This project is fork of Guile 1.8.8 version, that aims to :
- Be compatible with recent and newer systems. This includes MSVC 64 bits, and Android.
- To be dependency free.
- To be easily embeddable in other projects.
Platform | Build Status | Test Pass |
---|---|---|
Ubuntu Latest |
This version of Guile use CMake as a build system. Autoconf was designed for Unix systems, and is difficult to use on MSVC. That is why we prefer to use CMake, which has a cross-platform easy syntax, can generate not only Makefile but also Visual Studio projects, Xcode projects, and many others, and can be easily integrated to Android and iOS project.
On any system, you can build Guile with the following commands :
mkdir build
cd build
cmake ..
cmake --build .
This Guile version has been designed to be embeddable in other CMake projects.
add_subdirectory(thirdparty/guile)
add_executable(my_executable my_executable.c)
target_link_libraries(my_executable PUBLIC guile)
If you are building a Qt Application with Guile (for example for an Android application), enable the USE_GUILE_QT
option when configuring Guile :
set(USE_GUILE_QT5 ON CACHE BOOL "Use Guile with Qt" FORCE)
# or
set(USE_GUILE_QT6 ON CACHE BOOL "Use Guile with Qt" FORCE)
Using Qt resources, Guile will automatically embed ice9 into your application. You can use te embedded ice9 by adding scm_use_embedded_ice9();
to your C++ code :
#include <libguile.hpp>
int main(int argc, char **argv) {
scm_use_embedded_ice9();
scm_boot_guile(argc, argv, inner_main, nullptr);
return 0;
}
Note that scm_use_embedded_ice9();
has the priority to the GUILE_LOAD_PATH
environment variable.
The new C++ callback API is a new way to call C++ code from Guile code. It is a replacement for the old scm_c_define_gsubr
API.
The new API allows to use member functions as callbacks, to use lambdas, and to capture variables in the lambdas.
register_callback("testfn8", [](SCM args) {
printf("testfn8 called\n");
return SCM_UNSPECIFIED;
}, 8);
scm_c_eval_string("(testfn8 1 2 3 4 5 6 7 8)");
We do not plan to implement the following features :
- Futures
- i18n (gettext)
- ioext
- everything related to posix (exemple: filesys, regex)
- net_db, socket
- dynamic linking
- extensions
We do not plan to re-active the following features :
- threads