From: leon breedt Date: 2004-11-16T12:32:10+09:00 Subject: Re: ruby extension best practices thanks for all the suggestions, SWIG seems to be closest to what i want (the others seem to be fine for small amounts of interfacing, but i want a fair amount of API coverage and with library data types mapped to Ruby classes). in short, i just want something that does the Data_Wrap_Struct/Data_Get_Struct magic for me, as well as the C<->Ruby type marshaling. SWIG would appear to have this as a goal, buti'm having some problems with it. the library uses opaque structs for the most part. i can't seem to indicate that i want an opaque struct of a particular type to be mapped to a Ruby class, and methods taking the opaque struct pointer as an argument to become instance methods of that class. i tried this using %extend, but that errors out when given an opaque struct, it wants a struct body, defeating the whole point of using SWIG, and breaking the signature of library methods. anyone have any experience with SWIG used like this? leon