Docs GODI Archive
Projects Blog Knowledge

Look up function:

(e.g. "List.find" or "keysym")
More options
Programming with Objective Caml Document Tree
 
  NAVIGATION

Caml Components
Findlib
 Ocamlnet
 XML
 WDialog


RELATED
The Findlib manual online
The Findlib Quickstart guide
Download Findlib


Contact
    This is the archived Findlib page. The new homepage can be found here!

Findlib

Abstract

The "findlib" library provides a scheme to manage reusable software components (packages), and includes tools that support this scheme. Packages are collections of OCaml modules for which metainformation can be stored. The packages are kept in the filesystem hierarchy, but with strict directory structure. The library contains functions to look the directory up that stores a package, to query metainformation about a package, and to retrieve dependency information about multiple packages. There is also a tool that allows the user to enter queries on the command-line. In order to simplify compilation and linkage, there are new frontends of the various OCaml compilers that can directly deal with packages.

Together with the packages metainformation is stored. This includes a version string, the archives the package consists of, and additional linker options. Packages can also be dependent on other packages. There is a query which finds out all predecessors of a list of packages and sorts them topologically. The new compiler frontends do this implicitly.

Metainformation can be conditional, i.e. depend on a set of predicates. This is mainly used to be able to react on certain properties of the environment, such as if the bytecode or the native compiler is invoked, if the application is multi-threaded, and a few more. If the new compiler frontends are used, most predicates are found out automatically.

There is special support for scripts. A new directive, "#require", loads packages into scripts. Of course, this works only with newly created toploops which include the "findlib" library.

Documentation

The most important features are explained in the Findlib Quickstart Guide.

The "findlib user's guide and reference manual" is included in this distribution. In doc/src the SGML/docbook sources can be found. Other formats are provided as well.

There is also an online exemplar of the manual.

Prerequisites

Currently, findlib works only with Unix-based operating systems. It has been tested with Linux, Solaris, and AIX, and is supposed to work with many others as well. Volunteers are still wanted who port findlib to Windows and Macintosh.

Findlib needs Objective Caml version 3.xx.

How to get findlib

You can download a gzip'ed tarball containing the sources. Instructions how to compile and install the program can be found in the file INSTALL; it is more or less the same procedure as every times.

What are the advantages of a package manager?

  • Packages can often be compiled without customizing the Makefile, because the necessary compiler options can be queried by the package manager.

  • Packages can often be installed without setting a target directory. Packages can always be safely uninstalled.

  • It is possible to use a package, i.e. link it together with the using program, without having to know details such as the installation directory, the names of the code archives, or necessary system libraries.

  • Packages can be dependent on each other, which means that if you use a package requiring another package to be linked, too, the package manager recognizes this, and links both packages to your program.

  • This means that you can compile and install programs on systems that are different than the system where the programs have been developed, and that you need not to customize any compiler option. It just works out of the box.

  • You can now develop Caml scripts that run on every system without any modification, because the package loading mechanism is also available for scripts.

  • It is possible to provide different code archives for multi-threaded and single-threaded usage; the lookup mechanism of the package manager automatically selects the right one. The same applies to profiling support.

 
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml