Previous Up Next

NAME

charon --- an interoperability tool that allows Moby programs to access C data and call C functions.

SYNOPSIS

charon file ...

DESCRIPTION

The charon command is used to create glue code that enables Moby programs to access C data structures and invoke C functions. The tool takes a C header file and produces a Moby MBX file, which is a textual representation of the Moby compiler's internal representation. The gen-mbi tool converts MBX files into MBI files, which are the binary representation of Moby library code.

In more detail, if charon is invoked on C header file c.h, it will produce a file c.mbx. gen-mbi can then be invoked to produce c.mbi. A Moby program m.mby may access the data and use the functions described by c.h by passing the associated C object file c.o to mobyc and by including c.mbi in the filemap given to mobyc.

OPTIONS

--cpp

Run the C pre-processor on the argument files before generating MBX code.

SEEALSO

mobyc, gen-mbi

Previous Up Next