Giter VIP home page Giter VIP logo

ruby-sys's People

Contributors

d-unseductable avatar dovahcrow avatar ianks avatar malept avatar mjc-gh avatar nomoon avatar simon0191 avatar steveklabnik avatar turboladen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ruby-sys's Issues

array::rb_ary_new() Segfaults.

Originally d-unseductable/ruru#33.

Currently, creating a new ruby array segfaults.

extern crate ruby_sys;
use ruby_sys::array;

fn main() {
  unsafe {
    let foo = array::rb_ary_new();
  }
}

Here's the result of cargo run --verbose for anyone curious

       Fresh libc v0.2.14
       Fresh ruby-sys v0.2.6
   Compiling test_ruru v0.1.0 (file:///Users/william/code/test_ruru)
     Running `rustc src/main.rs --crate-name test_ruru --crate-type bin -g --out-dir /Users/william/code/test_ruru/target/debug --emit=dep-info,link -L dependency=/Users/william/code/test_ruru/target/debug -L dependency=/Users/william/code/test_ruru/target/debug/deps --extern ruby_sys=/Users/william/code/test_ruru/target/debug/deps/libruby_sys-6948a09fc5cf7b2c.rlib -L /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib`
src/main.rs:6:9: 6:12 warning: unused variable: `foo`, #[warn(unused_variables)] on by default
src/main.rs:6     let foo = array::rb_ary_new();
                      ^~~
     Running `target/debug/test_ruru`
error: Process didn't exit successfully: `target/debug/test_ruru` (signal: 11, SIGSEGV: invalid memory reference)

Basic how-to documentation

Hey Steve, great work! I've been looking at the various ruby-rust-ruby crates and what I can't find is documentation on using them.

Currently I'm looking to do something that may be somewhat simple as returning an Array from Rust to Ruby with FFI. I've opened an issue danielpclark/faster_path#6 to discuss that on my project.

Basically I'm not fully aware of what problems this project addresses. I don't see howtos or examples of it, or basic documentation. I'm thinking I'd like to use this crate, but I don't know where to begin.

Publish a new version?

The latest version does not include the RUBY_STATIC changes, so we are relying on Github's master branch. Would it be possible for you to push a new version?

setting $RUBY_STATIC doesn't seem to generate a statically linked library

if I do echo $RUBY_STATIC in my environment, I get back 1, so the env var is set, but ruby-sys is still trying to link against libruby.so. ldd target/release/mylib.so shows the dynamic link to libruby.so, so I tried moving the dynamic library somewhere that it won't be on the path and rebuilding. Now, Rust complains that /usr/bin/ld: cannot find -lruby, which just shows what I thought was happening.

Looking at the build script, it seems to support the notion of linking against the Ruby library statically, but it doesn't seem to do that. Is this a working thing?

I'm on 64-bit Fedora 27.

Not working with rust 13.0?

I'm getting a silent failure running a native extension with Rust 1.13. My public external "init" function fires and returns, but none of its calls to Ruby (rb_define_module, rb_define_method) seem to have any effect. Not getting any errors either. Everything runs perfectly with Rust 1.12.1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.