Why not rewriting iw to a lib and a cmd interface?

Why is there nothing like a c iw library?
I always copy the code from iw to libiwinfo...