A tool for converting C and Objective-C headers to D modules
This is a new major version with a whole bunch of new features and bug fixes. The biggest features are support for translating some preprocessor directives like: #define
for simple constants and function like macros. This release also adds support for a new platform, Windows.
Here's the full changelog:
#define FOO 1
)#define FOO(a, b) a + b
)##
)--package
CLI option)--reduce-aliases
which disables/enables the above functionality--alias-enum-members
which enables generation of aliases for enum members in the global scope--translate-macros
which can disable the translation of C macro definitionslibclang
bindings as a test casealias Y = X
) in the outputnothrow
, @nogc
)--rename-enum-members
, which enables stripping of superfluous prefixes from enum members.--normalize-modules
, which enables changing the names of modules to the D conforming form.#define
(simplest cases only?)wchar_t
should be translated to core.stdc.stddef.wchar_t
__attribute__((__packed__))
const T x[]
to const (T)* x
#define
constant.#define
of types results in incorrect output@selector("foo")
id
is translated to ObjcObject
The biggest news for this release is the support for new platforms. DStep is now available on Mac OS X, Linux and FreeBSD. On all of these platforms both 32bit and 64bit architectures are supported.
This tool requires libclang. Any version that is 3.1 or later and binary compatible with 3.1 should work. Either download the pre-compatible libraries from the LLVM site or use libclang shipping with your system or available from the system package manager. For more information see the readme.
Pre-compiled binaries of libclang: http://llvm.org/releases/download.html#3.1.