RubyConf 2023 - Wrapping Rust in Ruby by Garen Torikian

Introducing Rust to Rubyists, highlighting its benefits in memory safety and performance, and exploring the simplicity of wrapping Ruby projects with Rust code.

Key takeaways
  • Wrapping Rust in Ruby: Garen Torikian’s talk at RubyConf 2023 introduces Rust to Rubyists, highlighting its benefits in memory safety and performance.
  • Ruby’s strength in C integration: Ruby’s tightly coupled relationship with C is its greatest strength, making it easy to integrate C code into Ruby projects.
  • Memory safety and Rust: Rust’s memory safety features help eliminate memory issues, making it a suitable replacement for C code.
  • Magnus: Bundler’s Magnus project simplifies the integration of Rust into Ruby, allowing developers to write Rust code in Ruby.
  • Easy integration: Writing Rust code in Ruby is easy and straightforward, with simple code conversions and minimal overhead.
  • Apprehension regarding C: Many developers are hesitant to work with C due to the complexity and difficulties involved.
  • C extensions for Ruby: C extensions for Ruby can be compiled automatically, eliminating the need for manual configuration.
  • Ruby’s slow language speed: Some argue that Ruby is slow compared to other languages, but Torikian believes this is a subjective statement.
  • Wrapped Ruby projects: Examples of wrapped Ruby projects include the common mark gem, which converts markdown to a format readable by Ruby.
  • Rust-backed gems: Rust-backed gems like oxidize.rb group enable developers to use Rust in Ruby projects.
  • Ruby’s garbage collection: Ruby’s garbage collection is not perfect and can be frustrating to work with.
  • Conclusion: The talk aims to demonstrate the simplicity and benefits of integrating Rust into Ruby projects.