caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Matthieu Dubuget" <matthieu.dubuget@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] ocaml dll in an Erlang runtime
Date: Thu, 21 Jun 2007 14:23:35 +0200	[thread overview]
Message-ID: <9f09a07a0706210523s658056c7sf9ede3e571f27bc5@mail.gmail.com> (raw)
In-Reply-To: <200706211300.24624.jon@ffconsultancy.com>

[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1697 bytes --]

  reply	other threads:[~2007-06-21 12:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-21  9:39 Ulf Wiger (TN/EAB)
2007-06-21  9:52 ` [Caml-list] " Joel Reymont
2007-06-21 10:15   ` Matthieu Dubuget
2007-06-21 10:28     ` Joel Reymont
2007-06-21 10:42       ` Ulf Wiger (TN/EAB)
2007-06-21 19:09       ` Pablo Polvorin
2007-06-21 10:34     ` Ulf Wiger (TN/EAB)
2007-06-21 12:00     ` Jon Harrop
2007-06-21 12:23       ` Matthieu Dubuget [this message]
2007-06-21 19:00         ` Pablo Polvorin
2007-06-22 10:22       ` Dmitry Bely
2007-06-22  8:02 ` Xavier Leroy
2007-06-22 11:57   ` Serge Aleynikov
2007-06-25  9:44   ` Ulf Wiger (TN/EAB)
2007-06-23  4:02 ` Jon Harrop
     [not found] ` <1182973204.24639.1197385329@webmail.messagingengine.com>
2007-06-27 21:07   ` Ulf Wiger (TN/EAB)
2007-06-28  8:22     ` Gabriel Kerneis
2007-06-28  8:38       ` Gabriel Kerneis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f09a07a0706210523s658056c7sf9ede3e571f27bc5@mail.gmail.com \
    --to=matthieu.dubuget@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).