Skip to content

Instantly share code, notes, and snippets.

@pindell-matt
Last active April 26, 2016 23:37
Show Gist options
  • Save pindell-matt/1aef3d4a858d89ae5a1a415ece00d340 to your computer and use it in GitHub Desktop.
Save pindell-matt/1aef3d4a858d89ae5a1a415ece00d340 to your computer and use it in GitHub Desktop.

Using Rust from within Ruby using Foreign Function Interface (FFI)

Background

  • I've been experimenting with Rust in my free time.

Brief intro to Rust

  • Explain core values (safety, speed, concurrency) / what differentiates it from Ruby
  • Write "Hello, World" (keepin' it classic)

Show the Ruby program

  • Display the functioning Ruby code (fibonnaci sequence or standard deviation)
  • Use benchmarks to show that while the code is functioning, it's lacking in speed

Intro the Foriegn Function Interface

  • Explain the concept
  • Walk through the setup within Ruby

Run Benchmarks

  • Benchmark Ruby code
  • Benchmark Rust code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment