dstep 0.2.2
A tool for translating C and Objective-C headers to D modules
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
DStep
DStep is a tool for translating C and Objective-C headers to D modules.
Download
For the latest release see: releases/latest.
Pre-compiled binaries are available for OS X, Linux and FreeBSD, as 64bit. See the releases section.
Arch packages are available in [community] repository (thanks to Михаил Страшун):
https://www.archlinux.org/packages/?q=dstep
Alternatively install via Dub
License
The source code is available under the Boost Software License 1.0
Building
Requirements
- libclang - http://clang.llvm.org - 3.1 or later that is binary compatible with 3.1
- DMD - http://dlang.org/download.html - 2.069.2
- Dub http://code.dlang.org/download
Building
- Install all requirements, see above
- Clone the repository by running:
$ git clone git://github.com/jacob-carlborg/dstep.git
- run
dub build
Usage
$ dstep Foo.h -o Foo.d
For translating Objective-C headers add the -ObjC
flag.
$ dstep Foo.h -o Foo.d -ObjC
Use -h
for usage information. Any flags recognized by Clang can be used.
Limitations/Known issues
- Doesn't translate preprocessor macros of any kind
- Doesn't translate
#include
toimport
. A few standard C headers are translated - Doesn't translate C++ at all
- Umbrella headers. Some headers just serve to include other headers. If these other headers contain some form of protection, like
#error
, to be included directly this can cause problems for DStep - Some headers are designed to always be included together with other header files. These headers may very well use symbols from other header files without including them itself. Since DStep is designed to convert header files one-by-one this doesn't work. There are two workarounds for this:
- Add
#include
-directives for the header files the header file is actually using - Use the
-include <file>
flag available in Clang to indicate the given<file>
should be processed before the file that should be translated. DStep accepts all flags Clang accepts
- Add
- Registered by Jacob Carlborg
- 0.2.2 released 8 years ago
- jacob-carlborg/dstep
- github.com/jacob-carlborg/dstep
- BSL-1.0
- Copyright (c) 2011-2016 Jacob Carlborg. All rights reserved.
- Authors:
- Dependencies:
- dstack
- Versions:
-
1.0.4 2023-Jun-06 1.0.3 2021-Jul-31 1.0.2 2021-Jan-22 1.0.1 2019-Apr-28 1.0.0 2019-Apr-19 - Download Stats:
-
-
0 downloads today
-
3 downloads this week
-
4 downloads this month
-
1230 downloads total
-
- Score:
- 2.2
- Short URL:
- dstep.dub.pm