Thanks to visit codestin.com
Credit goes to lib.rs

114 releases

0.9.117 Aug 1, 2025
0.9.116 Jun 2, 2025
0.9.115 May 14, 2025
0.9.111 Feb 28, 2025
0.9.28 Jul 28, 2022

#235 in Procedural macros

Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

148,316 downloads per month
Used in 10 crates (via rb-sys)

MIT/Apache

74KB
2K SLoC

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.6+
  • Rust: 1.65+

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.

Dependencies

~5.5–7.5MB
~137K SLoC