3 ms·
I didn't know Ruby had Rust support, that's seriously awesome. I suppose Rust extensions use the C ABI.
by matheusmoreira 4y ago
I didn't know Ruby had Rust support, that's seriously awesome. I suppose Rust extensions use the C ABI.
- matsadler 4y agoThe template generated with bundle gem —-ext=rust uses the Magnus[1] library that provides a high-level friendly Rust wrapper over the Ruby C API, but you can also use rb-sys[2] which is lower level bindings direct to the Ruby C API. [1]: https://github.com/matsadler/magnus https://github.com/matsadler/magnus [2]: https://github.com/oxidize-rb/rb-sys https://github.com/oxidize-rb/rb-sys
- n8ta 4y agoI was writing native extensions about 2 years ago so its been possible for awhile. The rutie crate for rust makes it much easier.