(guile-tut.info.gz) What is libguile
Info Catalog
(guile-tut.info.gz) Two world views
(guile-tut.info.gz) Guile in a Library
(guile-tut.info.gz) How to get started with libguile
4.2 What is libguile
====================
"Libguile" is the library which allows C programs to start a Scheme
interpreter and execute Scheme code. There are also facilities in
libguile to make C data structures available to Scheme, and vice versa.
The interface provided by the libguile C library is somewhat specific
to the implementation of the Scheme interpreter. This low-level
libguile interface is usually referred to as the `scm_' interface,
since its public calls (API) all have the `scm_' prefix.
There is also a higher-level libguile interface, which is usually
referred to as the `gh_' interface (libGuile High). Its public calls
all have the `gh_' prefix. The `gh_' library interface is designed to
hide the implementation details, thus making it easier to assimilate
and portable to other underlying Scheme implementations.
People extending Guile by adding bindings to C libraries (like OpenGL
or Rx) are encouraged to use the `gh_' interface, so their work will be
portable to other Scheme systems. The `gh_' interface should be more
stable, because it is simpler.
The `scm_' interface is necessary if you want to poke into the
innards of Scheme data structures, or do anything else that is not
offered by the `gh_' interface. It is not covered in this tutorial,
but is covered extensively in Guile Reference Manual (Guile
Reference Manual)Scheme data representation.
This chapter gives a gentle introduction to the `gh_' interface,
presenting some _hello world_-style programs which I wrote while
teaching myself to use libguile.
The `Guile Programmer's Manual' gives more examples of programs
written using libguile, illustrating diverse applications. You can also
consult my _Gnudl_ documentation at
`http://nis-www.lanl.gov/~rosalia/mydocs/' to see a large scale project
that uses C and Scheme code together.
Info Catalog
(guile-tut.info.gz) Two world views
(guile-tut.info.gz) Guile in a Library
(guile-tut.info.gz) How to get started with libguile
automatically generated byinfo2html