I've started playing with writing bindings to the Ruby MRI for Rust programs. I've basically just been transcribing things from ruby.h so far, with the barest work on higher-level bindings. I welcome contributions from anybody else who's interested in making this possible! It's a fun way to learn more about Ruby and how to create Rustic APIs!
It'd be fun to discuss the
Value APIs. I'll probably have to deal with similar challenges in the Gtk-rs project since
gobject has a
Value type too.
While there's not much meat there yet, I'd just advise against this:
In my experience it's neater when the
ffi:: qualifiers are explicit, making the use of
ruby.h constants and the calls across the FFI boundary more apparent.
Interesting. Why did you opt for MRI instead of MRuby?
Because I know nothing about Ruby interpreters besides JRuby.
I'm excited about this project!
MRuby is a new Ruby specifically targeted at the Lua case: embedding in other languages. So yeah, it would be cool to try as well.
No issue there, just that - as @steveklabnik says - MRI is not exactly built for embedding to the point where Matz himself created an embeddable version of Ruby.
Looking forward to see what comes out of your project :).