Ender is library written in C that describes other libraries. The purpose of Ender is to easily create bindings for any C library without much struggling.
Ender uses an intermediary XML format to describe your library, loads it and registers every definition of your library. For example, for a C library defined like this:
/* contents of foo.h */typedefstruct_Foo_S1 {
inti;
char*s;
} Foo_S1;
intfoo_s1_has_i(Foo_S1*thiz);And the corresponding XML's Ender file foo.ender:
<?xml version="1.0" standalone="yes"?>
<libname="foo"version="0"case="underscore">
<!-- Define the struct -->
<structname="foo.s1">
<!-- Now the fields -->
<fieldname="i"type="i32"/>
<fieldname="s"type="string"/>
<!-- A method always receives the struct/object as its first argument -->
<methodname="has_i">
<returntype="i32"transfer="full"/>
</mthod>
</struct>
</lib>For some big libraries, it might be tedious to do the XML file manually, for that, there is an automatic generator from doxygen documentation.
For API reference check out the automatically generated doxygen documentation
Take a look on the wiki pages for extra information about the project
There are several projects for creating bindings of ender to specific languages. Several are still in deveolping tho
- Is ender an OO for C? No, it is not. It lets you describe a library that uses any OO system for C (GLib, EO, Enesim Object, your own custom, etc)