Giter Site home page Giter Site logo

lizabelos / guile18_androidmsvc Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 7.4 MB

License: Other

CMake 1.23% Shell 0.46% Makefile 0.71% M4 0.13% Scheme 33.45% Batchfile 0.01% Python 0.18% Emacs Lisp 1.67% C 57.31% Pascal 2.43% Lex 0.13% Awk 0.04% Logos 1.76% RPC 0.18% C++ 0.32% QMake 0.01%

guile18_androidmsvc's Introduction

Guile++

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.

Status

Platform Build Status Test Pass
Ubuntu Latest Build Status

Building

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 .

Embedding

This Guile version has been designed to be embeddable in other CMake projects.

1. Clone this repository in a subdirectory of your project (e.g. thirdparty/guile)

2. Add the following lines to your CMakeLists.txt file :

add_subdirectory(thirdparty/guile)

3. You can now use the guile target in your project :

add_executable(my_executable my_executable.c)
target_link_libraries(my_executable PUBLIC guile)

Using Guile with Qt

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 (experimental)

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)");

What is not working with this version of Guile ?

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

guile18_androidmsvc's People

Contributors

lizabelos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.