caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* CamlIDL - stub code generator and COM binding for OCaml
@ 1999-03-05 10:41 Xavier Leroy
  1999-03-05 20:46 ` Andrew Martin
  0 siblings, 1 reply; 9+ messages in thread
From: Xavier Leroy @ 1999-03-05 10:41 UTC (permalink / raw)
  To: caml-list

Just like everyone else who has read the papers on H/Direct by Meijer,
Peyton-Jones et al, I have been working lately on a COM binding for
Objective Caml.  I have just released one of the preliminary results
of this work: CamlIDL 1.00.  Sources and documentation are available from

  ftp://ftp.inria.fr/lang/caml-light/bazar-ocaml/camlidl-1.00.tar.gz
  ftp://ftp.inria.fr/lang/caml-light/bazar-ocaml/camlidl-1.00.doc.ps.gz
  ftp://ftp.inria.fr/lang/caml-light/bazar-ocaml/camlidl-1.00.doc.html.tar.gz

The documentation can also be browsed at

  http://caml.inria.fr/camlidl/htmlman/

CamlIDL comprises two parts:

- A stub code generator that generates the C stub code required for
  the Caml/C interface, based on an MIDL specification.  (MIDL stands
  for Microsoft's Interface Description Language; it looks like
  C header files with some extra annotations, plus a notion of object
  interfaces that look like C++ classes without inheritance.)

- A (currently small) library of functions and tools to import COM
  components in Caml applications, and export Caml code as COM
  components.

CamlIDL can be used in several ways:

- Under Unix and Windows, as a stub code generator for using C
  libraries from Caml.  It takes care of the gory details of
  the Caml/C interface, such as all those pesky Val_xxx and Xxx_val
  macros, proper registration of GC roots, the different calling
  conventions from bytecode and from native-code, etc.

- Under Unix and Windows, as a simple interface between Caml classes
  and C++ classes.  The C++ fragment supported is that corresponding
  to COM interfaces, i.e. interface polymorphism, but not inheritance.
  Communication in both directions (COM/C++ object to Caml object
  and Caml object to COM/C++ object) is provided.

- Under Windows, as a COM binding for Caml.  There are two applications:

  * Use COM components from Caml applications.  This should eventually
    allow Caml code to exploit many Windows libraries and "script"
    many Windows applications.  See the H/Direct papers for nice
    examples.  This hasn't been tried yet with CamlIDL, because of
    the incredible lack of documentation on Microsoft's components
    and on Microsoft's IDL extensions they use in their interfaces.

  * Encapsulate Caml code in COM components that can be used in
    other applications.  This offers great potential for writing
    the juicy bits of an application in OCaml and use C++ or Visual
    Basic or Internet Explorer or whichever Microsoft behemoth to do
    the GUI and other boring parts.  Currently, CamlIDL can create
    "in-proc servers" for Caml components (i.e. DLLs that are registered
    in the system registry and loaded automatically in applications
    that use the components).  "Out-of-proc" servers and distributed
    objects are not supported yet.  Currently, only native interfaces
    are supported, but not yet dispatch interfaces.

While the stub generation aspects of CamlIDL are already relatively
mature, the COM binding is still very preliminary.  My hope in
releasing it is that others more experienced with COM than I am will
try it on real-world applications and let me know what is wrong or
missing.

- Xavier Leroy




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1999-03-12 17:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-05 10:41 CamlIDL - stub code generator and COM binding for OCaml Xavier Leroy
1999-03-05 20:46 ` Andrew Martin
1999-03-08  9:41   ` Sven LUTHER
1999-03-09 16:07   ` Xavier Leroy
1999-03-09 18:54     ` Andrew Martin
1999-03-12 10:47       ` Thierry Bravier
1999-03-10  9:11     ` Pierre Weis
1999-03-10  9:43     ` Jacques GARRIGUE
1999-03-09 21:57   ` doligez

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).