Hello,
The support for building Rust extensions added in #5175 is great! But we are lacking documentation on the proper way to use it. https://guides.rubygems.org/gems-with-extensions/ only talks about C extensions as well.
After trying to publish a gem with a Rust extension built with rutie, it seems like the ruby library has to require the <gemname.so> file for the integration to work. However, it is not clear how to build that shared library while developing the gem locally. Cargo builds usually end up in the target directory, and it only builds the lib<gemname>.so object (which incidentally ends up at /path/to/ruby/extensions/<platform>/release. through the Cargo extension builder).
Moreover, it seems like it expects us to check in the Cargo.lock file, whereas Cargo by default adds to to .gitignore for lib projects.
Basically, I think we can benefit from docs on how to structure the project correctly to be installed and worked on locally. I haven't yet figured out a way to make both of those possible at the same time, so while I am willing to contribute docs, I would appreciate pointers!
I will abide by the code of conduct.
Hello,
The support for building Rust extensions added in #5175 is great! But we are lacking documentation on the proper way to use it. https://guides.rubygems.org/gems-with-extensions/ only talks about C extensions as well.
After trying to publish a gem with a Rust extension built with rutie, it seems like the ruby library has to require the
<gemname.so>file for the integration to work. However, it is not clear how to build that shared library while developing the gem locally. Cargo builds usually end up in thetargetdirectory, and it only builds thelib<gemname>.soobject (which incidentally ends up at/path/to/ruby/extensions/<platform>/release. through the Cargo extension builder).Moreover, it seems like it expects us to check in the
Cargo.lockfile, whereas Cargo by default adds to to.gitignoreforlibprojects.Basically, I think we can benefit from docs on how to structure the project correctly to be installed and worked on locally. I haven't yet figured out a way to make both of those possible at the same time, so while I am willing to contribute docs, I would appreciate pointers!
I will abide by the code of conduct.