Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Looking for pointers regarding integration of OCaml plugins into OCaml native code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-03-04 (13:37)
From: David MENTRE <dmentre@l...>
Subject: Looking for pointers regarding integration of OCaml plugins into OCaml native code

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,


[1] Feature 3 in: 


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