-
-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Hey there! Incredibly excited that Ruby support has been added. I've been poking around at it, and at least with some very simple scripts, it does appear to work fine on macOS with a few tweaks and/or changes to the build environment.
The primary challenge comes from the fact that the rb-sys
feature ruby-static
is opted into by default and it seems to mostly be a challenge of getting a build of Ruby on macOS w/ the static library included.
If --enable-shared
is passed to ./configure
in the Ruby build process (as it is by default with ruby-build
), it will omit including the static library in the install (on macOS, at least)
Specifying --enable-install-static-library
(e.g. via RUBY_CONFIGURE_OPTS
when using ruby-build
/rbenv install
) enables its inclusion even if --enable-shared
is passed as well, but rb-sys
still seems to end up linking to the dynamic one anyway (I believe this is a preference of the linker on macOS, but not exactly sure how to override it for this dependency specifically.)
Using --disable-shared
, I was able to validate it does work in my own project by compiling a build of Ruby this way and vendoring it in the project.
I'll happily throw up a docs PR for it once I tidy a few things up on my own project's use of it, but figured I'd share what I've poked at so far, in case others on a Mac are eager to use it!