High-level bindings of [Ruby]'s C API for [Rust].
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.2"
Rosy has functionality that is only available for certain Ruby versions. The following features can currently be enabled:
ruby_2_6
For example:
toml
[dependencies.rosy]
version = "0.0.2"
features = ["ruby_2_6"]
Finally add this to your crate root (main.rs
or lib.rs
):
rust
extern crate rosy;
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"); ```
This project is released under either:
at your choosing.