Compiled cache

For better starting time, Sagittarius caches compiled libraries. The cache files are stored in one of the following environment variables;

For Unix like (POSIX) environment:

For Windows environment:

Sagittarius will use the variables respectively, so if the SAGITTARIUS_CACHE_DIR is found then it will be used.

The caching compiled file is carefully designed however the cache file might be stored in broken state. In that case use -c option with sagittarius, then it will wipe all cache files. If you don't want to use it, pass -d option then Sagittarius won't use it.

Precompiling cache file

Users can provide own library with precompile script. The script looks like this;

(import (the-library-1)
        (the-library-2))

When this script is run, then the libraries will be cached in the cache directory.

Note: The cache files are stored with the names converted from original library files' absolute path. So it is important that users' libraries are already installed before precompiling, otherwise Sagittarius won't use the precompiled cache files.

Deviate

Some of the behaviours are not compliant or deviate from other implementations. Here, we list some of them.

Macro expansion

The following code will print #t instead of #f with -r6command line option or doing it on a library:

(import (rnrs) (for (rnrs eval) expand))

(define-syntax foo
  (lambda(ctx)
    (syntax-case ctx ()
      ((_ id)
       (free-identifier=?
	#'id
	(eval '(datum->syntax #'k 'bar) (environment '(rnrs))))))))

(define bar)

(display (foo bar))

This is because, Sagittarius doesn't have separated phases of macro expansion and compilation. When foo is expanded, then the bar is not defined yet or at least it's not visible during the macro expansion. So, both _bar_s are not bound, then free-identifier=? will consider them the same identifiers.