Official chibi-scheme repository
Find a file
Alexei Lozovsky 26061930e9 Always install Snow libraries to /usr/local
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.
2020-02-02 16:21:21 +02:00
benchmarks adding count to gc timer 2015-06-27 20:43:43 +09:00
build-lib/chibi/char-set Noting some simple char-set utilities are public domain. 2015-04-09 01:43:17 +09:00
contrib cmake: Add CMakeLists.txt 2017-11-18 16:28:31 +09:00
data Adding a gitignore for the temp data dir. 2015-04-09 01:30:06 +09:00
doc Fix typo in sexp_get_output_string documentation 2019-03-09 02:01:39 +01:00
examples Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
include/chibi Fix NetBSD, DragonFly BSD and Darwin feature detection 2019-08-15 19:03:57 -05:00
js js/exported_functions.json: make it proper json 2018-11-25 19:10:35 +01:00
lib Always install Snow libraries to /usr/local 2020-02-02 16:21:21 +02:00
opt making string-cursors a disjoint type 2016-03-29 22:25:09 +09:00
tests adding ffi test with unsigned-char param 2020-01-27 22:19:51 +08:00
tools don't escape html in sxml-display-as-text, add newline after li (issue #592) 2019-12-26 22:49:18 +08:00
.gitignore Add lib/chibi/pty.c to .gitignore 2019-08-28 19:38:08 -05:00
.hgignore Emscripten support by default. Patch from Marc Nieper-Wi?kirchen. 2015-02-22 16:10:30 +09:00
.travis.yml wrong filename 2016-06-24 22:51:36 +09:00
appveyor.yml AppVeyor: Add MSVC x64 configuration to CI 2018-06-20 21:22:36 +09:00
AUTHORS adding note that marc wrote syntax-case in AUTHORS 2019-01-26 17:52:37 +08:00
bignum.c fix comparison of negative bignums (issue #541) 2019-05-21 22:26:37 +08:00
chibi-scheme.pc.in Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
CMakeLists.txt (chibi pty): Disable in CMake build 2019-08-24 07:08:47 +09:00
configure adding informational configure script 2016-06-24 22:55:08 +09:00
COPYING adding (srfi 101) 2018-01-15 23:51:16 +09:00
eval.c fix (expt fixnum flonum) by reverting ce9c60c1 2019-09-09 23:25:27 +08:00
fedora.spec Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
gc.c mmapped heaps: fix for systems with W^X policies 2019-10-04 20:50:41 -05:00
gc_heap.c use PRId64/32 where available for printing fixnums (issue #479) 2018-06-29 22:44:16 +08:00
main.c -R needs interpreter name, not SRFI 22 2019-01-01 23:18:49 +08:00
Makefile Always install Snow libraries to /usr/local 2020-02-02 16:21:21 +02:00
Makefile.detect build on Solaris-like systems 2019-08-11 22:30:17 +00:00
Makefile.libs Always install Snow libraries to /usr/local 2020-02-02 16:21:21 +02:00
mkfile Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
opcodes.c fixing read-line on network ports 2019-05-04 13:18:27 +08:00
plan9.c Updating copyright years. 2015-04-09 01:28:02 +09:00
README-win32.md doc: Update README-win32.md to reflect recent changes 2018-06-20 21:22:36 +09:00
README.libs Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
README.md Note that chibi works on OpenBSD in the README 2019-03-10 15:03:48 -05:00
RELEASE bumping version 2017-10-06 23:56:31 +09:00
sexp.c pipes should be escaped in symbols (fixes issue #571) 2019-09-23 11:53:54 +08:00
simplify.c Updating copyright years. 2015-04-09 01:28:02 +09:00
TODO updating note about thread status in TODO 2018-04-03 07:53:36 +09:00
VERSION bumping version 2017-10-06 23:56:31 +09:00
vm.c re-run scheduler if only thread was still waiting (issue #594) 2019-12-26 23:42:15 +08:00

Chibi-Scheme

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.