splitting off bindings [was: Re: patch to TODO]
Joe Shaw
joeshaw at novell.com
Fri Feb 17 10:19:35 PST 2006
Hi,
On Thu, 2006-02-16 at 19:11 -0500, Rémi Cardona wrote:
> Couldn't something like swig be used to help bindings devs?
I don't know a whole lot about SWIG, but my understanding is that it
just generates simple wrappers around C APIs. That would solve the work
of binding to a low-level API, but it's only a fraction of the total
work necessary.
A large part of creating a binding for an IPC mechanism like dbus is
generating native method calls that applications can use as an API.
Interpreted, dynamic languages like python can do this fairly easily at
runtime, but compiled languages are a little trickier.
For mono specifically, proxy classes can be generated either ahead of
time (which is what the glib bindings do, I believe) or at runtime
(which is what the mono bindings currently do). Runtime is a little
nastier because you actually have to generate the IL instructions for
the runtime. Ahead of time you could just write a tool which scans
assemblies for certain types and attributes and generate source files
for another assembly. I'm not totally sure which the right approach is
at this point.
Joe
More information about the dbus
mailing list