From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id EAA05513; Thu, 14 Jun 2001 04:07:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA05332 for ; Thu, 14 Jun 2001 04:07:26 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f5E27OT17498 for ; Thu, 14 Jun 2001 04:07:24 +0200 (MET DST) Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3/3.7W) with ESMTP id LAA11493; Thu, 14 Jun 2001 11:06:46 +0900 (JST) To: wester@ilt.fhg.de Cc: caml-list@inria.fr Subject: Re: [Caml-list] Natively compiled code and toplevel In-Reply-To: <200106131434.QAA25999@ilt.fhg.de> References: <200106131434.QAA25999@ilt.fhg.de> X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010614110645H.garrigue@kurims.kyoto-u.ac.jp> Date: Thu, 14 Jun 2001 11:06:45 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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. Cheers, 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