Ruby FFI for Quick Prototyping

I recently found myself trying to answer the question “Is there a quick way to talk to a USB HID device from Windows via Ruby?”. The short answer is “yes, via HID API and FFI,” but that’s much too short a story. Let’s look at the long answer: I consulted my trusty friends Github, Rubygems, […]

Making Friends with FFI

Is your Ruby C Extension lonely? FFI can help. Many Ruby programmers have found the need to make calls on C libraries. Sometimes this is for writing performance-critical code and sometimes it is to use an existing library written in C. Ruby extensions are created by writing a small amount of glue code in C. […]