Snow-Chibi is a local package manager, not a system one. It can install Scheme packages into system but they are not managed by system package manager like dpkg, RPM, pacman, ports, etc. Traditionally (and in accordance with Filesystem Hierarchy Standard), /usr/local hierarchy should be used for local administrator installs -- and that's what Snow-Chibi provides. Let's make sure that Snow-Chibi installs snowballs into /usr/local hierarchy even if Chibi is compiled for installation into the system, with PREFIX=/usr. Introduce a distinct bunch of variables holding paths to library installation directories, with "SNOW" prefix: - SNOWPREFIX - default prefix for Snow-installed stuff - SNOWLIBDIR - custom libraries required for Snow itself - SNOWSOLIBDIR - shared libraries required for Snow itself - SNOWMODDIR - Snow installs Scheme modules here - SNOWBINMODDIR - Snow installs native libraries here All of these are set to /use/local by default, just as they are now. However, they are not affected by regular PREFIX, LIBDIR, MODDIR, etc. which affect only libraries bundled with Chibi. And in order for these to work, they need to be added into the current module path so that they can be used in parallel with system libraries. Furthermore, we need to tweak "get-install-library-dir" function to use those paths instead of hardcoded "/usr/local/lib" by default. Introduce a new helper "get-install-library-dirs", similar to "get-install-dirs". It will look up the correct installation directories in current module path, giving preference to the ones with "/lib" in them. With these defaults, Snow will install Scheme modules into /usr/local/share/snow and native libraries go into /usr/local/lib/snow, similar to how built-it libraries are installed into /usr/local/share/chibi and /usr/local/lib/chibi is used for native code. Of course, this can be overriden at build time by setting SNOWPREFIX or individual SNOWMODDIR, SNOWBINMODDIR variables. |
||
---|---|---|
benchmarks | ||
build-lib/chibi/char-set | ||
contrib | ||
data | ||
doc | ||
examples | ||
include/chibi | ||
js | ||
lib | ||
opt | ||
tests | ||
tools | ||
.gitignore | ||
.hgignore | ||
.travis.yml | ||
appveyor.yml | ||
AUTHORS | ||
bignum.c | ||
chibi-scheme.pc.in | ||
CMakeLists.txt | ||
configure | ||
COPYING | ||
eval.c | ||
fedora.spec | ||
gc.c | ||
gc_heap.c | ||
main.c | ||
Makefile | ||
Makefile.detect | ||
Makefile.libs | ||
mkfile | ||
opcodes.c | ||
plan9.c | ||
README-win32.md | ||
README.libs | ||
README.md | ||
RELEASE | ||
sexp.c | ||
simplify.c | ||
TODO | ||
VERSION | ||
vm.c |
Minimal Scheme Implementation for use as an Extension Language
http://synthcode.com/wiki/chibi-scheme
Chibi-Scheme is a very small library intended for use as an extension and scripting language in C programs. In addition to support for lightweight VM-based threads, each VM itself runs in an isolated heap allowing multiple VMs to run simultaneously in different OS threads.
There are no external dependencies so is relatively easy to drop into any project.
The default repl language contains all bindings from
R7RS small,
available explicitly as the (scheme small)
library. The
language is built in layers, however - see the manual for
instructions on compiling with fewer features or requesting
a smaller language on startup.
Chibi-Scheme is known to work on 32 and 64-bit Linux, FreeBSD, NetBSD, OpenBSD and OS X, Plan 9, Windows (using Cygwin), iOS, Android, ARM and Emscripten. Basic support for native Windows desktop also exists. See README-win32.md for details and build instructions.
To build on most platforms just run make && make test
. This will
provide a shared library libchibi-scheme, as well as a sample
chibi-scheme command-line repl. You can then run
sudo make install
to install the binaries and libraries. You can optionally specify a PREFIX for the installation directory:
make PREFIX=/path/to/install/
sudo make PREFIX=/path/to/install/ install
By default files are installed in /usr/local.
If you want to try out chibi-scheme without installing, be sure to set
LD_LIBRARY_PATH
so it can find the shared libraries.
For more detailed documentation, run make doc
and see the generated
doc/chibi.html.