[cfe-dev] Introducing "Deobjectivizer"
doob at me.com
Mon Mar 19 02:31:17 CDT 2012
On 2011-04-11 03:24, Charles Davis wrote:
> I've been working on a secret Clang-based project for a while, and now
> I'm ready to share it with the world.
> Introducing the "Deobjectivizer".
> This is a program that scans framework bundle headers for Objective-C
> constructs, and generates procedural C wrappers around them, so you can
> call them from C. It uses Clang's libraries to parse, analyze, and
> rewrite Objective-C headers into pure C headers, and then generate
> corresponding source files containing the wrapper implementations. The
> implementation of this tool is a little hackish at the moment, but it
> suffices to generate a wrapper around the entire Foundation framework
> (at least).
> Using this program, developers no longer have to use Objective-C to
> develop for Cocoa*. Projects like Wine that don't allow Objective-C can
> use Cocoa anyway. iOS developers can write their programs in a language
> other than Objective-C.
> I've attached the source so you can play with my newest creation. At the
> moment, it can only be built on Mac OS X (only one of two platforms, the
> other being iOS, where a program like this makes sense anyway). Feel
> free to make changes; the sources are licensed under the same license as
> Clang itself.
> Comments welcome. What do you think?
This looks awesome. I'm working on a similar tool but it translate the
Objective-C headers to D instead of C.
More information about the cfe-dev