oxidize-rb/rb-sys

Easily build Ruby native extensions in Rust

Rust

318

864 commits

updated Oct 14, 2026

See the code

README

rb-sys

.github/workflows/ci.yml Join the discussion Crates.io Gem

The primary goal of rb-sys is to make building native Ruby extensions in Rust easier than it would be in C. If it's not easy, it's a bug.

Documentation

For comprehensive documentation, please refer to the Ruby on Rust Book, which covers:

  • Getting started and quick start tutorials
  • Working with Ruby objects, classes, and modules
  • Memory management and safety
  • Cross-platform development
  • Testing and debugging
  • API reference for rb-sys crate and rb_sys gem

Components

  • rb-sys crate: Battle-tested Rust bindings for the Ruby C API
  • rb_sys gem: Simplifies compiling Rust code into Ruby extensions
  • rb-sys-test-helpers: Utilities for testing Ruby extensions from Rust
  • rb-sys-dock: Docker-based cross-compilation tooling

Supported Toolchains

  • Ruby: 2.7+
  • Rust: 1.75+

Real-World Examples

  • oxi-test - Canonical example of rb-sys usage (minimal, tested, cross-compiled)
  • blake3-ruby - Fast cryptographic hash function
  • wasmtime-rb - WebAssembly runtime with rb-sys and Magnus
  • lz4-ruby - LZ4 compression library

Getting Help

Contributing

See the CONTRIBUTING.md file for information about setting up a development environment.

License

Licensed under either of:

at your option.

native-extensions
ruby
ruby-extension
rubygem
rust

oxidize-rb/rb-sys

Easily build Ruby native extensions in Rust

Rust

318

864 commits

updated Oct 14, 2026

See the code

README

rb-sys

.github/workflows/ci.yml Join the discussion Crates.io Gem

The primary goal of rb-sys is to make building native Ruby extensions in Rust easier than it would be in C. If it's not easy, it's a bug.

Documentation

For comprehensive documentation, please refer to the Ruby on Rust Book, which covers:

  • Getting started and quick start tutorials
  • Working with Ruby objects, classes, and modules
  • Memory management and safety
  • Cross-platform development
  • Testing and debugging
  • API reference for rb-sys crate and rb_sys gem

Components

  • rb-sys crate: Battle-tested Rust bindings for the Ruby C API
  • rb_sys gem: Simplifies compiling Rust code into Ruby extensions
  • rb-sys-test-helpers: Utilities for testing Ruby extensions from Rust
  • rb-sys-dock: Docker-based cross-compilation tooling

Supported Toolchains

  • Ruby: 2.7+
  • Rust: 1.75+

Real-World Examples

  • oxi-test - Canonical example of rb-sys usage (minimal, tested, cross-compiled)
  • blake3-ruby - Fast cryptographic hash function
  • wasmtime-rb - WebAssembly runtime with rb-sys and Magnus
  • lz4-ruby - LZ4 compression library

Getting Help

Contributing

See the CONTRIBUTING.md file for information about setting up a development environment.

License

Licensed under either of:

at your option.

native-extensions
ruby
ruby-extension
rubygem
rust

Project health

crates.io

Latest release

0.9.130 · Aug 21, 2026

Releases this year

13

Significant stargazers

Alexandre ZANNI

2,406 followers · starred Feb 2025

Kenichi Kamiya

188 followers · starred Jul 2023

Anderson Bravalheri

146 followers · starred Feb 2023

Janko Marohnić

820 followers · starred Feb 2023