Add support for bundle gem --rust command#5613
Conversation
* master: (125 commits) Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name Bump rb-sys README.md: HTTP => HTTPS Avoid resetting specs after every gem install Slightly delay loading plugins Better solution to support truffleruby platform handling Add missing generic Extend `gem` DSL with a `force_ruby_platform` option Prefer to use modern hash style in docs Always show dependency installation output Account for default gems not having remote when caching Move rubygems source specific logic to rubygems source Prevent a warning: `*' interpreted as argument prefix Fix unintended double spaces in DSL documentation Use modern style hashes in Gemfile DSL docs Better format permission errors note Reorganize CONTRIBUTING file a bit Changelog for Rubygems version 3.3.17 Changelog for Bundler version 2.3.17 Add support for platforms :x64_mingw to correctly lookup "x64-mingw-ucrt" on Ruby 3.1 ...
|
Happy to beta test this once it's semi-ready, if you need a beta tester. (Bonus: I can test on both an Intel Mac and an M1 Mac) |
|
Damn, I have missed one. I have code prepared for Maybe we can just keep the standard Rust (Cargo) structure, but in So actual changing directory to Btw. we can make |
Unfortunately this does not provide many advantages, both Given that, I think using the traditional
I added some tests in my initial commit, but the bundler unit tests made this hard so I nuked them. I can add them back.
🔥 Sounds good! |
|
@ianks do you plan to continue on this or should I take over? I would like to merge with my branch and test. |
|
@ianks friendly pingie. I'll have time this weekend, I can try to finish it if welcomed. |
|
@simi can you take it from here? things got busy for me!! |
|
@simi let me know if you run into any issues! |
|
Hi, excited to see this included in Bundler! I just tried moving a project to this directory structure and think there may be a potential issue. From what I can tell, the Cargo builder always places the shared library in This may be something worth changing or making configurable with the Cargo builder. Edit: Here's what I needed to change to get it to work with both |
|
For others that stumble on this, check out the structure I setup for |
|
Hmm, it doesn't seem to install correctly when using On installation, it creates Edit: |
Yeah you end up having to use a different name each. It's even a bit more entailed because for cross compiled gems you have to load based on the Ruby version. |
|
This PR can be closed now, correct? |
|
Yes
Dne st 21. 12. 2022 18:45 uživatel David Rodríguez ***@***.***>
napsal:
… This PR can be closed now, correct?
—
Reply to this email directly, view it on GitHub
<#5613 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABPLEFGBSZ4DCAQ3SWHRQDWOM62PANCNFSM5YGVIDWQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Thanks for getting this started @ianks! |
What was the end-user or developer problem that led to this PR?
Despite the recent support of Rust/Cargo as a supported language for developing Ruby gems (#5175), it's still too hard to scaffold out a Rust gem. It should be as easy to scaffold a Rust extension as it is a C extension.
What is your fix for the problem, implemented in this PR?
This PR adds the ability to scaffold a Rust gem by running:
bundle gem --rust. A few key points about this integration are:rake-compilervia therb_sysgem--rustflag over something like--ext=rust. It's much nicer to read and write.Looking forward to everyone's feedback!
Make sure the following tasks are checked