Re: Dynamic linking in CSL?

Francois Rouaix (rouaix@ephemere.inria.fr)
Thu, 28 Dec 1995 16:08:31 +0100

Message-Id: <199512281508.KAA10817@ephemere.inria.fr>
To: "Mark C. Chu-Carroll" <carroll@louie.udel.edu>
Subject: Re: Dynamic linking in CSL?
Date: Thu, 28 Dec 1995 16:08:31 +0100
From: Francois Rouaix <rouaix@ephemere.inria.fr>

> Is it possible, in CSL, to dynamically load and link a CSL module
> which matches a static signature?

Dynamic linking is available for CSL (bytecode compiler only !)
as a library, in csl/otherlibs/dynlink.
Type safety is handled exactly as for static linking, except that you
can restrict arbitrarily the modules "exported" to dynamically linked
bytecode.
I have used this feature extensively in my MMM browser, written in CSL with
CamlTk4.
The difficulty is to invoke code from dynamically loaded modules. I believe
the easiest way is to provide "registration functions" that the extension
will call during loading.
E.G. in MMM
let _ = Applets.register the_function "some name"

and other similar "hooks" mechanisms.

--
Francois.Rouaix@inria.fr                   Projet Cristal - INRIA Rocquencourt
WWW Home Page: http://pauillac.inria.fr/~rouaix/