ffi/ffi — Issue #178: [feature request] Bitwise specification in structs
Author: utensil
Created: 2011-11-15 00:27:53+00:00
State: open

Hi all,

It's common to have bit fields in c structs, especially network packets. Is bitwise specification and operation DSLs planned? Or is it left to be done by other gems?

From one point, this grammer sugar can be provided in other gems , because a working struct with bit fields must written in a cross-platform way, thus can be handled by ruby level. On the other hand, some might request ffi to handle cross-platform details in C level. I'm not quite sure which is better, so hereby I throw out such question.

Thanks for any comments.