summaryrefslogtreecommitdiffstats
path: root/ocaml/META.in
Commit message (Collapse)AuthorAgeFilesLines
* build: xml-light is no longer required (thanks Maxim Koltsov).Richard W.M. Jones2010-11-111-2/+2
| | | | | | At some point we removed the last thing that required xml-light, but were still testing for it at various places in the build. This removes all traces.
* inspector: Generate language bindings for OCaml.Richard Jones2009-10-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a generic mechanism for deriving language bindings for virt-inspector, and implements one concrete binding, for OCaml. The bindings are generated from the RELAX NG schema (virt-inspector.rng) which is supposed to be a correct and always up to date description of the XML that the virt-inspector program can generate. From the RNG we generate a set of types to describe the output of virt-inspector for the language, plus an XML parser, plus some glue code to actually run an external instance of virt-inspector and parse the resulting XML. At runtime, an external 'virt-inspector --xml <name>' command runs and the XML is parsed into language-specific structures. This has been tested on the four example files (inspector/example?.xml) The only particular difficulty about the OCaml binding is the use of Obj.magic, which is naughty but works because of the isomorphism between the representation of tuples and records in OCaml. This seems to cause no problems in my test program. Apart from this, the OCaml binding is straightforward and could be adapted easily for any other languages that want type-safe virt-inspector bindings. It's important to keep virt-inspector.rng up to date with changes to virt-inspector's XML output format.
* Outline OCaml bindings.Richard Jones2009-04-071-0/+5