How to write a Rack adapter with C
I would like to see if it is possible to exchange data between g-wan server and ruby but I need to implement a Rack adapter. I could write one in Ruby, but I need to use C because g-wan API is in C (or Java). Is there any documentation to do that? Does Rack has a C API?
- You could open OS pipe from ruby and write some data into it, then receive it from your C program.
- It is possible to write extensions to Ruby in C. Just search the Internet for resources on this topic.
- Use JRuby, it runs on JVM and allows you to use arbitrary jars. Also, it is really good Ruby VM and has strong community.