Using Rust with Ruby
summary
Shows three concrete integration techniques: a C-extension using extconf.rb plus a small C wrapper that calls Rust functions like hello_rust, fill_slice and num (prints "hello world" twice and returns 5); loading a Rust shared library at runtime with fiddle/DL.open from a Rails app (no compilation hooks needed at runtime); and embedding MRuby via the m_rusty crate to build a single distributable binary. Demonstrations compile with cargo and run successfully.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 5:30Safety Speed Concurrency
- 7:33Compilers
- 10:13Integration
- 11:51Source Code
- 12:58Ext Directory
- 13:40mkmf
- 14:33build
- 18:11Binary gems
- 22:53Ruby Bug
- 23:23Ruby Gems
- 24:58Rust Example
- 25:37Rails Example
- 28:43MRuby
- 30:28MRust
related talks
31mWrapping Rust in Ruby
40mTurbo Rails with Rust
34mWhat Rust can teach us about Ruby
43mBending The Curve: Putting Rust in Ruby with Helix
46mRust for Rubyists
53mC++/Rust Interop: A Practical Guide to Bridging the Gap Between C++ and Rust
31mEmbedding Rust in C/C++
31mUsing Rust from C... or Any Language
