Rosy

Build status Lines of code crates.io downloads docs.rs

High-level bindings of [Ruby]'s C API for [Rust].

Installation

This crate is available on crates.io and can be used by adding the following to your project's [Cargo.toml]:

toml [dependencies] rosy = "0.0.1"

Rosy has functionality that is only available for certain Ruby versions. The following features can currently be enabled:

For example:

toml [dependencies.rosy] version = "0.0.1" features = ["ruby_2_6"]

Finally add this to your crate root (main.rs or lib.rs):

rust extern crate rosy;

Usage

Rosy allows you to perform many operations over Ruby objects in a way that feels very natural in Rust.

```rust use rosy::String;

// The VM should be initialized before doing anything rosy::vm::init().expect("Could not initialize Ruby");

let string = String::from("hello\r\n"); string.call("chomp!").unwrap();

assert_eq!(string, "hello"); ```

License

This project is released under either:

at your choosing.