~tim/rust-ruby-wrap-data

d91fede6ebbe1adb224a64aec4689e828458b414 — Tim Morgan 1 year, 11 months ago f1e2db0
Don't explicitly document license
2 files changed, 9 insertions(+), 17 deletions(-)

M README.md
M src/lib.rs
M README.md => README.md +9 -11
@@ 1,12 1,14 @@
# Ruby Wrap Data
# ruby-wrap-data

## Ruby Wrap Data

`ruby_wrap_data` is a crate that provides a fairly low-level means of doing
what Ruby's `Data_Wrap_Struct` macro does. That is to say, you can store a
Rust `Box<T>` inside a Ruby object and get it back out again.
pointer to a Rust `Box<T>` inside a Ruby object and get it back out again.

Any heap-allocated struct, enum, or whatever should work.

## Example
### Example

```rust
extern crate ruby_sys;


@@ 62,24 64,20 @@ fn main() {
}
```

## Testing
### Testing

Assuming you're using rbenv (if not, sorry, you're on your own):

```
```bash
CONFIGURE_OPTS=--enable-shared rbenv install
RUBY=$(rbenv which ruby) cargo test
```

You may need to help Rust find the libruby.so file, like this:

```
```bash
export LD_LIBRARY_PATH=$HOME/.rbenv/versions/2.5.1/lib
RUBY=$(rbenv which ruby) cargo test
```

## Copyright and License

Copyright Tim Morgan

Licensed MIT
License: MIT

M src/lib.rs => src/lib.rs +0 -6
@@ 77,12 77,6 @@
//! export LD_LIBRARY_PATH=$HOME/.rbenv/versions/2.5.1/lib
//! RUBY=$(rbenv which ruby) cargo test
//! ```
//!
//! ## Copyright and License
//!
//! Copyright Tim Morgan
//!
//! Licensed MIT

extern crate ruby_sys;