DStep - Bindings Generator 0.0.1
Jacob Carlborg
doob at me.com
Sat Jul 7 07:47:48 PDT 2012
DStep is a tool for translating C and Objective-C headers to D modules.
It uses libclang for lexing/parsing and AST traversal. This means it
handles everything that Clang itself can handle, although this doesn't
mean it will correctly translate everything.
I would consider this release alpha or beta. I'm releasing this now in
hope I get some feedback on what language features the tool can't handle.
The tool is available at github:
https://github.com/jacob-carlborg/dstep
Binaries are available for Mac OS X and Ubuntu 11.10 32bit:
https://github.com/jacob-carlborg/dstep/downloads
Unfortunately I haven't been able to successfully compile it on Windows
due to Optlink not cooperating. I'll most likely provide Linux binaries
with better compatibility later.
Build instructions are available at github.
Usage:
dstep <input-file.h> -o output_file.d
For Objective-C
dstep <input-file.h> -o output_file.d -ObjC
Tests:
DStep uses Cucumber and Aruba (Ruby tools) to run its tests. It will
basically run the tool on all *.h files in the "test_files" directory
and compare the results to the corresponding *.d files.
Known issues/missing functionality:
* Multiple input files
* Framework as input file
* Add module declaration
* Option for specifying before and after code
* Option for specifying package
* Windows support
C:
* Self includes
* Out of order typedefs of structs
* Bitfields
* Non-standard extensions
* Preprocessor
* Arrays with no size marked as "extern".
Objective-C:
* Protocols
* Properties
* Blocks
* Categories
* Actions
* Outlets
* Selectors
This is basically what's on the todo list:
https://raw.github.com/jacob-carlborg/dstep/master/todo.taskpaper
There's no point in reporting issues which are listed above.
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list