I wrote an AR archive (.a files) parser in D

Renato renato at athaydes.com
Sun Aug 4 20:14:50 UTC 2024


Hey,

I wanted to learn how AR archives work, and use D for something 
not so hard to practice a little bit.
Unfortunately, they don't seem to be standardized, but [the 
Wikipedia](https://en.wikipedia.org/wiki/Ar_(Unix)) entry helped 
me a lot.

I got it mostly working and it's able to parse several `.a` files 
I've tried, including libphobos.a and .a files generated on my 
system. It's not complete yet as I didn't parse the "file mode" 
bytes and I didn't consider "System V extensions" (though I did 
include the "BSD Variant" as D uses that on MacOS), but that 
should be easy to do soon.

Just announcing here in case someone may be interested in that 
(the code is very easy to read) and wants to give some feedback 
on my usage of D (I'm not experienced in D, just using it for 
some fun every now and then).


More information about the Digitalmars-d mailing list