caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David MENTRE <dmentre@linux-france.org>
To: caml-list@inria.fr
Subject: Looking for pointers regarding integration of OCaml plugins into OCaml native code
Date: Sat, 04 Mar 2006 14:38:32 +0100	[thread overview]
Message-ID: <87ek1icotj.fsf@linux-france.org> (raw)

Hello,

I would like to extend an OCaml native code application with plugins
written in OCaml (preferably native code). So, much like the C/OCaml
interface, I would like to have some dynamically loaded OCaml code
calling my application core code and vice versa.

>From my readings of the caml-list archives, I understand that:

 1/ It is possible to load bytecode code into a bytecode application,
    using the Dynlink module;

 2/ It could be possible to load native code into a native code
    application[1] but Xavier thinks this is no longer possible or too
    difficult[2]. I haven't be able to find the explanation Xavier is
    refering to. Has anybody a pointer to it? I would like to understand
    the issue(s).

 3/ With original OCaml, it is not possible to load a bytecode into a
    native code application but that might be possible with the
    Asmdynlink module of Fabrice Le Fessant[2]. If I remember correctly
    (can't remember where I read that), the main issue is that native
    and bytecode have not exactly the same memory representation (thus,
    for example, the GC is different). Is that correct?

Beside the missing pointer in 2/, has anybody some pointers on the
issues involved?

Best whishes,
david

Footnotes:

[1] Feature 3 in:
http://groups.google.com/group/fa.caml/browse_frm/thread/2827ec9d553e7760/392f26ba4316e957?tvc=1&q=xavier+leroy+dynamic+load#392f26ba4316e957 

[2]  http://groups.google.com/group/fa.caml/browse_frm/thread/941afd4bad6fde92/865f61b89ec57b7a?q=xavier+leroy+dynamic+native+code&rnum=1#865f61b89ec57b7a

-- 
pub  1024D/A3AD7A2A 2004-10-03 David MENTRE <dmentre@linux-france.org>
 5996 CC46 4612 9CA4 3562  D7AC 6C67 9E96 A3AD 7A2A


             reply	other threads:[~2006-03-04 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-04 13:38 David MENTRE [this message]
2006-03-04 14:01 ` [Caml-list] " Basile STARYNKEVITCH
2006-03-06 16:06   ` Walid Taha
2006-03-11 19:51   ` David MENTRE
2006-03-11 21:40     ` Nathaniel Gray
2006-03-06  6:06 ` Alessandro Baretta

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=87ek1icotj.fsf@linux-france.org \
    --to=dmentre@linux-france.org \
    --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).