2.0.0: vendored RE2 2023-09-01 & native gems
This is a major new version of re2 which no longer requires the RE2 library to be installed as the latest version (2023-09-01) is now vendored with the gem.
Vendored RE2
Installing the gem will also compile and install RE2 (and its dependency, Abseil). As this can take some time, precompiled native gems are available for the following platforms meaning there’s no need to wait for compilation in the majority of cases:
aarch64-linux
(requires: glibc >= 2.29)arm-linux
(requires: glibc >= 2.29)arm64-darwin
x64-mingw32
/x64-mingw-ucrt
x86-linux
(requires: glibc >= 2.17)x86_64-darwin
x86_64-linux
(requires: glibc >= 2.17)
Breaking changes
Due to a new dependency on MiniPortile2 and the need to include compiled C extensions for every supported version of Ruby in the native gems, this major version drops support for all Ruby versions prior to 2.6.
Opting out of the vendored RE2
To opt out of using the gem’s vendored dependencies and instead rely on the previous behaviour of linking against a system install of RE2, use the --enable-system-libraries
option when installing the gem.
Note you’ll also need to use the ruby
platform to avoid the native gems either via gem install re2 --platform=ruby -- --enable-system-libraries
or Bundler's force_ruby_platform
option.
Thanks
This major release would not have happened without @stanhu.