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
Dynamic linking in CSL?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1996-01-04 (10:26)
From: Francois Rouaix <rouaix@e...>
Subject: Re: Dynamic linking in CSL?

> 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
I have used this feature extensively in my MMM browser, written in CSL with
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/