Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Alain Frisch <frisch@c...>
Subject: [announce] dl-runtime
Hello,

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
  or:
    LD_LIBRARY_PATH=/usr/local/lib/ocaml ocamlrun -llibunix_so.so
my_program

- 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