/ruby-rust-examples

Example code of using Rust from Ruby

Primary LanguageRuby

This is a short collection of examples on interoperability between Ruby and Rust using Ruby's "fiddle" standard library and Rust's C interface.

Points and Lines

A simple struct on the Rust side is handled as a pointer the Ruby side.

Deals with: ownership/lifetime, integers

Messages

Passes messages between Rust and Ruby.

Deals with: strings

Cryptography

Calculates MD5 hash given an number or a string.

Deals with: cargo, crates