Subject: Re: [ruby-ffi] Standardizing the FFI specs |
From: Evan Phoenix |
Date: 12/14/09 5:28 PM |
To: ruby-ffi@googlegroups.com |
Hi Ernie, I am indeed here. There are 2 issues. The first is the API and it's divergence. My original API was slim and light, but had a number of holes. Those holes have been filled by the different implementations in different ways and thusly only the simplest of APIs are now common. I think that it is in the best interest of FFI, if it is truly to be a cross implementation API, that all new API additions stop and we begin to formalize a 1.0 API. This would allow us a clean, consistent target for all implementations. In addition, it would simplify what to spec. I don't want to turn this into design by committee, but if people do want the API to be cross implementation, some degree of coordination and agreement must be reached. Unilateral changes only destabilize the effort. Since it appears that most of the FFI implementers are on this list, please reply to this email and indicate that you'd like to participate in the planning of the 1.0 API. To kick off the 1.0 planning, here is the list of builtin types that I believe the 1.0 should contain: Fundamental Types: Platform Independent: int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64, pointer, string, buffer Platform Dependent: char, uchar, int, uint, long, ulong, float, double Composite Types: struct, callback Users would have the ability to add their own aliases for structs, etc. In addition, I believe the unix types provided by sys/types should be made available by requesting so. Perhaps calling "FFI.add_sys_types" would be fine (this as opposed to a require so that it can be calculated entirely at runtime if need be) Thats a good place for us to start. Please comment. - Evan On Dec 14, 2009, at 2:17 PM, Ernest Prabhakar wrote:
<http://github.com/ffi/ffi/tree/master/spec/ffi/> to our existing RubySpec tests. When I asked on the rubyspec list about what could be done to "mainstream" FFI, I was told: On Dec 4, 2009, at 2:51 PM, Brian Ford wrote:Hi all, This is Dr. Ernie, one of the MacRuby committers. We would like to add the FFI specsThe specs need quite a bit of cleanup to conform to the rubyspec style guide.
http://rubyspec.org/wiki/rubyspec/Style_GuideAlso, the API is still in flux a bit. If you'd like to contribute to the specs or FFI API, please coordinate with Evan Phoenix (evan in #rubinius on freenode.net) as he is the original API author and is trying to get the API standardized across implementations.Evan, are you here? What process would you suggest? Should I file a bug about the specs (on Kenai)? Or should I wait until the API stabilizes a bit more? -- Ernie P.