IAPark / tiktoken_ruby

Unofficial ruby binding for tiktoken by way of rust
MIT License
109 stars 26 forks source link

Fix compiling in ruby 3.0 #3

Closed IAPark closed 1 year ago

IAPark commented 1 year ago

Fixes #1 which highlighted that builds are failing in Ruby 3.0. I think this was because while this project started with rb_sys I'd briefly experimented with the native rust extension support available in Ruby 3.1+. While it worked I did end up switching back, but it looks like I never switched the gemspec file back.

IAPark commented 1 year ago

@petergoldstein if you have a sec to see if this seems right to you I'd appreciate it

petergoldstein commented 1 year ago

@IAPark Do you need to update the README as well?

petergoldstein commented 1 year ago

I'm honestly not sure. Looking at @ankane 's tokenizers-ruby, I'm not sure the switch from compile to build is actually needed. The gemspec change looks correct though.

IAPark commented 1 year ago

I think build should just add packaging the gem into a .gem file so it does sound right that it isn't actually needed to run specs or to test in development, but I think I prefer having having the CI fail in the situation where the gemspec was messed up like it was here