Updated Ruby 3.2 llibrary for Windows

As announced earlier we’re working on moving from Ruby 2.7 to Ruby 3. Initially we tried to do that earlier this year using Ruby 3.1 but ran into a serious performance regression that we had to work with the Ruby maintainers to resolve.

Since then we switched our Ruby target version to Ruby 3.2 and have been running tests with that. We have published Ruby 3.2 headers and libraries in our Ruby C Extension examples for developers to test their own builds against:

We just pushed another update to this today that require Windows builds to update.

The change is that our Ruby DLL initially was named x64-msvcrt-ruby320.dll, following the naming convention in earlier SketchUp versions. This name was never fully accurate in term of what Ruby generates by default, but it was a compatibility shim with the Ruby Windows Installer.

Between Ruby 2.7 and Ruby 3.2 the DLL name of Ruby in what Ruby Windows Installer produce by default changed; x64-ucrt-ruby320.dll.

This prevented Ruby C extensions compiled with a build of Ruby from this installer to load in SketchUp’s Ruby because they were linking against different DLL names.

While we can’t officially support binaries built against anything other than the headers/libs we provide, we changed our DLL name to mimic to match. There are developer tools offered as gems that is useful within SketchUp, such as RubyProf which SpeedUp uses. This renames makes it much easier to get such tools working within SketchUp.

In many (most?) cases the binaries build against standalone Ruby, but, note that the only officially supported method is to build against what we provide. For production code we recommend that you build all your Ruby C extensions against them.

Remember, if you previously built against the .lib we provided for Ruby 3.2 on Windows on the dev branch you must now update to use the new.

4 Likes

The GitHub repo folder linked above has not yet been updated with the Ruby 3.2 headers & libs.

N/m, you just did whilst I was typing. (How’s that for service?)

EDIT2: Okay, I know what is going on. You linked (“we provide”) to the main branch, but the 3.2 libs are in another branch not yet merged.

Thanks for the heads up. I updated the link.

1 Like