Next: , Previous: , Up: libutils   [Index]


7.8 Locating libraries on the file system

The library (vicare libraries) exports an API to configure and extend the process of searching for library files in source or binary format. Here is an overview of the “finding libraries” process:

  1. To use a library we must first intern it. Libraries are interned by the functions find-library-* (see Interning libraries), which make use of the parameter current-library-loader.
  2. The parameter current-library-loader references a function used to intern libraries given a R6RS library reference (see current-library-loader).
  3. The function default-library-loader is the default value of the parameter current-library-loader (see default-library-loader).
  4. The function default-library-loader makes use of the function referenced by the parameter current-library-locator to find libraries in some external repository (see current-library-locator).
  5. The parameter current-library-locator is usually initialised to one of the functions:
        run-time-library-locator
    compile-time-library-locator
          source-library-locator
    

    either by default, or by direct selection with the command line option --library-locator (see library-locator).

  6. The library locators run-time-library-locator, compile-time-library-locator and source-library-locator search the file system for a library file pathname matching a specified R6RS library reference.

Next: , Previous: , Up: libutils   [Index]