Skip to main content

oxidize.rb

Building Ruby extensions with Rust using rb-sys

Code Example

Ruby extensions with Rust performance and safety

Ruby
Rust
Ruby Implementation
# Define a Ruby class
class Calculator
def add(a, b)
a + b
end
end

# Use it
calc = Calculator.new
puts calc.add(40, 2) # => 42

Key Features

Easy to Use

Easy to Use

rb-sys integrates into Ruby projects with minimal setup, combining Ruby's flexibility with Rust's performance and safety.

Focus on What Matters

Focus on What Matters

rb-sys handles the complex FFI integration between Ruby and Rust, letting you concentrate on your application code.

Powered by Rust

Powered by Rust

Add Rust capabilities to Ruby applications with simplified bindings to the Ruby C API.