English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[announce] dl-runtime
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-12-30 (19:06)
From: Alain Frisch <frisch@c...>
Subject: [announce] dl-runtime

this is to announce the availability of dl-runtime, a patch to OCaml for
using primitives from shared libraries.

This is done by allowing runtime systems (ocamlrun or custom systems)
to load shared libraries, in addition to statically linked primitives,
in order to fulfill the requirements of the bytecode primitive table.

There is no special annotation in the source code: the choice of using
shared libraries is done at runtime.

There are two ways to specify which libraries to import:

- give this information via the runtime system command line ("-l..."):
    ocamlrun -l/usr/local/lib/ocaml/libunix_so.so my_program
    LD_LIBRARY_PATH=/usr/local/lib/ocaml ocamlrun -llibunix_so.so

- give the Caml linker a set of shared libraries to remember at runtime
  ("-dl ...")
    ocaml -noautolink -o my_program unix.cma my_program.cmo -dl libunix_so.so

  This simply puts annotations in the bytecode file.

For instance, it is possible to build shared versions of libunix,
libgraphics, libstr ... and use a small generic runtime system
to run any bytecode program using these libraries.

The patch is known to work under Linux 2.2 and Solaris 5.7.

Information: http://www.eleves.ens.fr:8080/home/frisch/info/README-DL
Download: http://www.eleves.ens.fr:8080/home/frisch/soft

  Alain Frisch