Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove linking unless explicitly enabling testing #31

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

andrewstucki
Copy link

@d-unseductable / @malept : So, here's my solution to the discussion in #25.

Basically the idea is to only pass the linkage to libruby when we build ruby-sys with --features=test. It's kind of ghetto that you have to actually feature-flag it, but it looks like that's the only way of really doing that in a build script as far as I can tell. Also, since you literally only need to link libruby when you would want to run Rust tests, I figure there's no real difference in just supporting dynamic linking.

I'll also submit a PR for ruru to re-export the feature flag so that the Rust tests can still be run.

@malept
Copy link
Contributor

malept commented Mar 9, 2018

Thanks, I really appreciate the amount of work you've put into researching the problem space and implementing a solution.

It seems like a reasonable change (and also means that I can delete a bunch of static-related code from Thermite), unfortunately I don't have write access to either this or ruru, so I can't merge either PR. I would wait anyway until the tests are fixed in master.

@andrewstucki
Copy link
Author

@d-unseductable in the meantime I believe I also fixed the travis tests. Basically the OS X images have pip2 instead of pip -- so travis-cargo needs to be installed with that. Also, I removed linking the libraries from LIBS since I believe they are only needed when you link to libruby statically.

@malept
Copy link
Contributor

malept commented Mar 9, 2018

Hrm, when I get some time I need to write a PR to replace travis-cargo (unmaintained, Python) with cargo-travis (maintained, Rust).

@Antti
Copy link

Antti commented Apr 4, 2018

I think this should be made configurable, since there is also a use case, where you want to run a ruby interpreter inside a rust program.
Imagine a rust program, embedding ruby interpreter for some scripting purposes.
It is possible now by just adding this crate, but with this PR, one would need to link libruby manually (or build their own build.rs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants