Writing a Linux driver in the D ecosystem

sarn sarn at theartofmachinery.com
Wed Oct 24 06:36:51 UTC 2018


On Tuesday, 23 October 2018 at 12:06:48 UTC, Eduard Staniloiu 
wrote:
> Hello, everyone!
>
> We, here at UPB, were thinking if it would be possible to write 
> a simple Linux driver.

Hi, I gave this a casual try once.  The difficulty is the same 
difficulty you get trying to write Linux kernel modules in C++: 
the Linux build system is a mess of make files that are only 
designed for C, and don't represent a stable API between kernel 
source versions.

If I had to write a Linux module in D, I'd write an interface 
layer in C that gets built using the normal Linux build system 
and can be linked to my D code.  The interface would have to 
provide alternatives to the various Linux preprocessor macros.  
(I think trying to refactor the build system to work with dpp 
would be a total waste of time.)


More information about the Digitalmars-d mailing list