Browse thread
Looking for pointers regarding integration of OCaml plugins into OCaml native code
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David MENTRE <dmentre@l...> |
| Subject: | Looking for pointers regarding integration of OCaml plugins into OCaml native code |
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