Re: DStep 1.0.0

2019-04-27 Thread Jacob Carlborg via Digitalmars-d-announce

On 2019-04-26 10:33, Robert M. Münch wrote:


Are there are any functional differences between the platforms?


The short answer is yes.


Or can I just use the OSX version and use the generated .d files with the DMD
Windows version too?


The longer answer is that it depends. DStep behaves the same way as the 
compiler (Clang in this case). That means that there are different 
predefined macro constants for different platforms. For example:


#if _WIN32
#include 
DWORD foo();
#else
int foo();
#endif

If you run DStep on Windows it will output:

extern (C):

DWORD foo();

But on any other platform it will output:

extern (C):

int foo();

So it's a question if the header files contain any code like the above. 
The bindings that DStep uses for libclang are generated on macOS but are 
used unchanged on Windows and Linux as well. But these are the most 
forgiven headers that I've seen when it comes to create bindings.


--
/Jacob Carlborg


Re: DStep 1.0.0

2019-04-26 Thread Robert M. Münch via Digitalmars-d-announce

On 2019-04-22 11:02:24 +, Jacob Carlborg said:


... and support for one more platform has been added: Windows...


Are there are any functional differences between the platforms? Or can 
I just use the OSX version and use the generated .d files with the DMD 
Windows version too?


--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



Re: DStep 1.0.0 on the Blog

2019-04-25 Thread James Blachly via Digitalmars-d-announce

On 4/23/19 3:23 PM, Jacob Carlborg wrote:

On 2019-04-23 14:10, Mike Franklin wrote:


Nice work, Jacob!  Very cool!


Thanks :)



Seconded -- absolutely fantastic


Re: DStep 1.0.0 on the Blog

2019-04-23 Thread Jacob Carlborg via Digitalmars-d-announce

On 2019-04-23 14:10, Mike Franklin wrote:


Nice work, Jacob!  Very cool!


Thanks :)

--
/Jacob Carlborg


Re: DStep 1.0.0 on the Blog

2019-04-23 Thread Mike Franklin via Digitalmars-d-announce

On Monday, 22 April 2019 at 12:24:16 UTC, Mike Parker wrote:
To coincide with the announcement of DStep 1.0.0, Jacob 
submitted a post to the D Blog that goes into detail on all the 
new stuff included in this release.


The blog:
https://dlang.org/blog/2019/04/22/dstep-1-0-0/

Reddit:
https://www.reddit.com/r/programming/comments/bg1ezr/dstep_100_generate_d_bindings_from_c_and/


Nice work, Jacob!  Very cool!

Mike


Re: DStep 1.0.0

2019-04-22 Thread Jacob Carlborg via Digitalmars-d-announce

On 2019-04-22 15:20, Dennis wrote:


Huh, I've been using DStep on Windows back in January.
I can't remember how I obtained the binary, but it's version 
0.2.3-67-gdeabc63.


The Windows support was implemented during GSoC 2016. It just has never 
been a new release since then. I have created a few tags, for various 
reasons, since then, but no official release.


It worked partially, but could not translate C function pointers to D's 
`function()` syntax, leaving a 'TODO' stub instead.

Has that changed? I can't find anything about it in the release notes.


Translating function pointers has probably been supported since the 
first release. There are tests for this. If there's something that is 
not working, please file a bug at [1]. Ideally with a minimal test case 
with the C code and the expected D code.


[1] https://github.com/jacob-carlborg/dstep/issues

--
/Jacob Carlborg


Re: DStep 1.0.0 on the Blog

2019-04-22 Thread bachmeier via Digitalmars-d-announce

On Monday, 22 April 2019 at 12:24:16 UTC, Mike Parker wrote:
To coincide with the announcement of DStep 1.0.0, Jacob 
submitted a post to the D Blog that goes into detail on all the 
new stuff included in this release.


The blog:
https://dlang.org/blog/2019/04/22/dstep-1-0-0/

Reddit:
https://www.reddit.com/r/programming/comments/bg1ezr/dstep_100_generate_d_bindings_from_c_and/


Nice post. I think "DStep" in the first sentence should be a link 
to the Github page. I didn't see any other links to it until the 
very bottom of the page.


Re: DStep 1.0.0

2019-04-22 Thread Dennis via Digitalmars-d-announce

On Monday, 22 April 2019 at 11:02:24 UTC, Jacob Carlborg wrote:
It now supports preserving comments and support for one more 
platform has been added: Windows.


Huh, I've been using DStep on Windows back in January.
I can't remember how I obtained the binary, but it's version 
0.2.3-67-gdeabc63.
It worked partially, but could not translate C function pointers 
to D's `function()` syntax, leaving a 'TODO' stub instead.
Has that changed? I can't find anything about it in the release 
notes.


In any case, glad to see the tool maturing!