djudd / human-name-rb

Ruby bindings for the Rust crate `human_name`, a library for parsing and comparing human names
Apache License 2.0
11 stars 1 forks source link

Not available on Rubygems #2

Closed cllns closed 7 months ago

cllns commented 6 years ago

It looks like humanname has been pulled from Rubygems (if it was once there): https://rubygems.org/gems/humanname

I was able to install it using specific_install extension to the gem command, but then I get the following error:

irb(main):001:0> require 'humanname'
...
LoadError (cannot load such file -- humanname/native)

Willing to help debug this, just not sure where to start.

(I originally commented part of this as #1, but deleted that once I ran into the LoadError, as it's a distinct problem.)

djudd commented 6 years ago

Weird, I have no idea why it disappeared, but I pushed again and there appear to be working versions now.

patbl commented 1 year ago

The most-recent version on RubyGems is currently 0.5.0:

image

Were 0.6.0 and 0.7.0 pushed to RubyGems at some point?

swistaczek commented 7 months ago

Hey @djudd, I appreciate your work! I want to ask if it's possible to push human name updates to RubyGems and update the rust dependency itself. Thank you!

djudd commented 7 months ago

I pushed a version 0.8 to Rubygems just now. It's got cross-compiled versions of the Rust library but I haven't tested those except for the Github CI. Please let me know if it works for you.

patbl commented 7 months ago

It looks like RubyGems has only the Mac ARM version (not sure if this was intended, or if the versions for other platforms disappeared):

image

I get version 0.5.0 if install it on Linux:

docker run --rm ruby:3.3.0 gem install humanname
Successfully installed blankslate-2.1.2.4
Successfully installed parslet-1.5.0
Successfully installed toml-0.1.2
Successfully installed thor-0.19.4
Building native extensions. This could take a while...
Successfully installed helix_runtime-0.6.4
Successfully installed humanname-0.5.0-x86_64-linux
6 gems installed
djudd commented 7 months ago

Ok, this is annoying. I set things up so that the gem always bakes in the native libraries for all the supported platforms after cross compiling with Rust. However, I can't figure out how to get gem build/push to do the equivalent of cross-compiling, even though that should be way simpler than what Rust has to do. Instead I did manage to get it pushing from Github Actions, which is cleaner... but also doesn't deal with cross-platform/cross-architecture stuff well.

The upshot is there's now a Linux-x86 version on Rubygems, but I'll open new issues for improved cross-platform support.

djudd commented 7 months ago

Created some new issues... PRs welcome!