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
[Caml-list] Natively compiled code and toplevel
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-06-14 (02:07)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] Natively compiled code and toplevel
> I looked over the mktoplevel manual and as far as I understand  it is 
> possible to link compiled C-code with the mktoplevel but not to link
> with natively compiled OCaml code. Am I right and why is this the case? 
> Rolf

You're right. To be efficient, native ocaml code does not use the same
conventions as C, so you cannot call a natively compiled ocaml function
as though it were a C function.

Fabrice Le Fessant has done some work on the other way round. See
asmdynlink on this page: http://pauillac.inria.fr/~lefessan/src/.
The idea is to be able to execute ocaml bytecode inside a native
program. With a large amount of hacking, it should be possible to
build an ocaml.opt, which in turn would allow you to link the toplevel
with native code...
I'm not sure it is worth the pain.


Jacques Garrigue
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr