From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id CEFC1BC6C for ; Thu, 21 Jun 2007 21:00:34 +0200 (CEST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5LJ0XZB016470 for ; Thu, 21 Jun 2007 21:00:34 +0200 Received: by wa-out-1112.google.com with SMTP id m34so531743wag for ; Thu, 21 Jun 2007 12:00:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=iQNI9BkBrePbMst7M4WqLm+yg/lg6asAoXpEuhvR0WYhd6+dZOiBpzQJsPzU7TtOK5IL8VRkgSieFW1nTB04oj4Oyv0EYvSTijAubrWaFSaQR8YQa38nA4kLLKXqegHCDCCLwUTA+Du8YEZBy+MfPE2f9l4nGLg0cyPUbSCkEcM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=o47OtJXXGDrm3255raaJ3JTR+KUSlnwCesIX3pIX8vpJWrd0HJyTXLqMzf189vsCIv0SjygMi0DRwnYhofnCFA6wu2Ufk7qZGHjV/2kB+UF85ojYPF7zS567is4RcUoH4LkL57wgJMAcfqrg3g6U+OTUMw/re4So/7KSTtBPKIg= Received: by 10.114.151.13 with SMTP id y13mr1999278wad.1182452432694; Thu, 21 Jun 2007 12:00:32 -0700 (PDT) Received: by 10.114.205.15 with HTTP; Thu, 21 Jun 2007 12:00:32 -0700 (PDT) Message-ID: <1ffe809c0706211200o4fe8f198l6f793370bd24a26d@mail.gmail.com> Date: Thu, 21 Jun 2007 21:00:32 +0200 From: "Pablo Polvorin" To: caml-list@inria.fr Subject: Re: [Caml-list] ocaml dll in an Erlang runtime In-Reply-To: <9f09a07a0706210523s658056c7sf9ede3e571f27bc5@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_156191_430404.1182452432480" References: <6616D98C65DD514BA2E1DDC5F92231550228B6EB@esealmw115.eemea.ericsson.se> <9f09a07a0706210315j1fc1f675yfdadf812c995da7f@mail.gmail.com> <200706211300.24624.jon@ffconsultancy.com> <9f09a07a0706210523s658056c7sf9ede3e571f27bc5@mail.gmail.com> X-j-chkmail-Score: MSGID : 467ACAD1.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 467ACAD1.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 erlang:01 runtime:01 ocaml:01 matthieu:01 matthieu:01 dubuget:01 dubuget:01 dlls:01 callbacks:01 cmxa:01 canasse:01 beginner's:01 bug:01 dlls:01 ------=_Part_156191_430404.1182452432480 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline just my 2c, a couple of weeks ago, i posted a little about the path that i followed to make a shared library with ocaml code, with links to readings that i had found useful to do so http://caml.inria.fr/pub/ml-archives/caml-list/2007/03/72f8409732a3aeb7a9d449c438bbff0e.fr.html As Matthieu, nothing automatic. 2007/6/21, Matthieu Dubuget : > > > > 2007/6/21, Jon Harrop : > > > > On Thursday 21 June 2007 11:15:39 Matthieu Dubuget wrote: > > > 2007/6/21, Joel Reymont : > > > > I tried to build a shared library for use with Ruby once and failed > > > > miserably. > > > > > > Could you please elaborate about this? Maybe not on this thread. > > > > > > I ask this, because almost all my OCaml code is use as shared > > libraries... > > > > I think a lot of people (myself included) would benefit enormously if > > you > > could explain in words of one syllable exactly how you can compile an > > OCaml > > program into a DLL (.so on Linux) and call it from C. > > > > Not an OCaml "program". I simply write C DLLs embedding my Caml code as > described in > 18.7.5 Embedding the Caml code in the C codehttp://caml.inria.fr/pub/docs/manual-ocaml/manual032.html#htoc238 > > > Nothing automatic. I manually write all C functions, have them call OCaml > callbacks, etc. > If this is actually what you have in mind, I can write and post one > minimalistic example. > > It is possible to have a tool to turn one OCaml library (CMA/CMXA) into > one shared library. > See ODLL, from N. Canasse in the hump. > > Salutations > > Matt > > > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > -- Pablo Polvorin ------=_Part_156191_430404.1182452432480 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline just my 2c,
a couple of weeks ago, i posted a little about the path that i followed  to make a shared library with ocaml code, with links to readings that i had found useful to do so

http://caml.inria.fr/pub/ml-archives/caml-list/2007/03/72f8409732a3aeb7a9d449c438bbff0e.fr.html
As Matthieu, nothing automatic.

2007/6/21, Matthieu Dubuget <matthieu.dubuget@gmail.com>:


2007/6/21, Jon Harrop <jon@ffconsultancy.com>:
On Thursday 21 June 2007 11:15:39 Matthieu Dubuget wrote:
> 2007/6/21, Joel Reymont <joelr1@gmail.com>:
> > I tried to build a shared library for use with Ruby once and failed
> > miserably.
>
> Could you please elaborate about this? Maybe not on this thread.
>
> I ask this, because almost all my OCaml code is use as shared libraries...

I think a lot of people (myself included) would benefit enormously if you
could explain in words of one syllable exactly how you can compile an OCaml
program into a DLL (.so on Linux) and call it from C.


Not an  OCaml "program". I simply write C DLLs embedding my Caml code as described in

18.7.5  Embedding the Caml code in the C code

http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html#htoc238
 
Nothing automatic. I manually write all C functions, have them call OCaml callbacks, etc.
If this is actually what you have in mind, I can write and post one minimalistic example.

It is possible to have a tool to turn one OCaml library (CMA/CMXA) into one shared library.
See ODLL, from N. Canasse in the hump.

Salutations

Matt



_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs




--
Pablo Polvorin ------=_Part_156191_430404.1182452432480--