nginx module bindings

w0rp via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 18 03:11:46 PDT 2015


On Saturday, 18 April 2015 at 02:03:40 UTC, Shammah Chancellor 
wrote:
> Hello DForum!
>
> I wanted to attempt to write an nginx module in Dlang.  
> However, the first step of generating some bindings is proving 
> to be a pain on linux.   Htod is windows only, and the other 
> projects either generate incomprehensible modules, or are way 
> out of date (it seems).
>
> Any pointers, or pre-existing bindings for nginx modules would 
> be appreciated.
>
> -Shammah

You might have to create the bindings yourself, if you do, please 
put them on GitHub and in a DUB package so others can benefit 
from them.

I have been creating bindings for the Pebble SDK recently, and 
during my time working on that, I have come up with a process for 
creating the C bindings.

1. Apply dstep to the headers. Remove any parts from the header 
files which it won't accept.
2. Open the .d files and the .h files, and compare the two.
3. Implement whatever dstep missed out.

dstep doesn't get you 100% of the way there, but it's a lot 
better than starting from nothing. I also have spent hours and 
hours working on the Pebble SDK headers recently, but that's only 
because I have been obsessed with translating all of the 
documentation to DDoc comments.


More information about the Digitalmars-d mailing list