Skip to main content

oxidize.rb

Building Ruby extensions with Rust using rb-sys

Why rb-sys?

Leverage Rust's performance, safety, and modern tooling without leaving the Ruby ecosystem.

Performance

Write CPU-intensive code in Rust to speed up bottlenecks in your Ruby application. Ideal for parsing, image processing, and complex computations.

Memory Safety

Eliminate a whole class of bugs with Rust's compile-time memory safety guarantees. Say goodbye to segfaults and memory leaks from native extensions.

Modern Tooling

Get access to the entire Rust ecosystem, including Cargo, a first-class package manager, and a rich library of existing crates.

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.

High-Performance JSON Parsing

A real-world example of replacing a pure Ruby method with a much faster Rust implementation.

Ruby
Rust
Ruby's standard JSON library
require 'json'

json_string = '{"name": "John Doe", "age": 30, "is_student": false}'

# Parse with standard library
parsed_data = JSON.parse(json_string)

puts parsed_data["name"] # => "John Doe"

Used By

`rb-sys` and the oxidize-rb toolchain are trusted in production by these and other great projects.