Open YOU54F opened 1 year ago
Latest release has just gone out
https://github.com/YOU54F/traveling-ruby/releases/tag/rel-20230803
@FooBarWidget This is pretty solid now, we've been running it in production in a variety of applications and not had any negative reports
If you land here, and you are after Windows support with native gems, and Ruby 3.2.2, check out this fork https://github.com/Largo/ocran of https://github.com/larsch/ocra
For the record we have used this fork to release the CLI tool for https://reclaim-the-stack.com on multiple platforms with 0 problems. Thanks a lot for putting in all the work @YOU54F
Would be great to get this merged to avoid reliance on forks.
For the record we have used this fork to release the CLI tool for https://reclaim-the-stack.com on multiple platforms with 0 problems. Thanks a lot for putting in all the work @YOU54F
Would be great to get this merged to avoid reliance on forks.
Awesome, super pleased it is working out for you! <3
Happy to make any changes to the PR to help with assisting getting it merged.
I think we will want to upgrade openssl to v3 as v1.1.x is now EOL
New release is out
RedCloth (4.3.3)
bcrypt (3.1.20)
charlock_holmes (0.7.7)
curses (1.4.4)
daemons (1.4.1)
escape_utils (1.3.0)
eventmachine (1.2.7)
fast-stemmer (1.0.2)
ffi (1.16.3)
hitimes (2.0.0)
json (2.7.1)
kgio (2.11.4)
mini_portile2 (2.8.5)
mysql2 (0.5.6)
nio4r (2.7.0)
nokogiri (1.16.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
pg (1.5.4)
posix-spawn (0.3.15)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.8)
raindrops (0.20.1)
redcarpet (3.6.0)
rexml (3.2.6)
rugged (1.7.2)
sqlite3 (1.7.2)
mini_portile2 (~> 2.8.0)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
unf_ext (0.0.9.1)
unicorn (6.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
yajl-ruby (1.4.3)
Ruby versions lower than 3.1.0 are built with OpenSSL 1.1.1w Ruby versions 3.1.0 or later are build with OpenSSL 3.2.0
CCACHE_VERSION=4.9 CMAKE_VERSION=3.28.1 CMAKE_MAJOR_VERSION=3.28 GCC_LIBSTDCXX_VERSION=9.3.0 ZLIB_VERSION=1.3 OPENSSL_VERSION=3.2.0 CURL_VERSION=8.5.0 GIT_VERSION=2.43.0 SQLITE_VERSION=3450000 SQLITE_YEAR=2024 MYSQL_LIB_VERSION=6.1.9 POSTGRESQL_VERSION=15.5 ICU_RELEASE_VERSION=74-1 ICU_FILE_VERSION=74_1 LIBSSH2_VERSION=1.11.0 LIBFFI_VERSION=3.4.4 LIBYAML_VERSION=0.2.5
CCACHE_VERSION=4.9 CMAKE_VERSION=3.28.1 PKG_CONFIG_VERSION=0.29.2 AUTOCONF_VERSION=2.71 AUTOMAKE_VERSION=1.16.5 LIBTOOL_VERSION=2.4.7 OPENSSL_VERSION=3.2.0 NCURSES_VERSION=6.4 LIBEDIT_VERSION=20230828-3.1 LIBEDIT_DIR_VERSION=20230828-3.1 GMP_VERSION=6.3.0 GMP_DIR_VERSION=6.3.0 LIBFFI_VERSION=3.4.4 LIBYAML_VERSION=0.2.5 SQLITE3_VERSION=3450000 SQLITE3_VERSION_YEAR=2024 XZ_VERSION=5.4.5 MYSQL_LIB_VERSION=6.1.9 POSTGRESQL_VERSION=15.5 ICU_RELEASE_VERSION=74-1 ICU_FILE_VERSION=74_1 LIBSSH2_VERSION=1.11.0 LIBXML2_VERSION=2.9.14 LIBXSLT_VERSION=1.1.34
musl based traveling-ruby packages
-alpine
suffix-alpine
suffix
So I took a diversion from Ruby for a bit, to port one of our Ruby apps to Rust.
I thought it would be nice to have a fall back in the cli for each command, to allow it to call the existing ruby cli app, by use of a flag or env var.
With the help of some cross-compilers, I was able to package the rust app, for more supported platform/arch combos than ruby.
That left me with the behaviour of having to tell users who are wanting to fallback to the ruby impl, but don't have a traveling-ruby runtime that they are 💩 out of luck, and stuck with my poorly written rust code. 🤮
What to do 🤔
💡 cross-compilation adventure with qemu, and a switch to ubuntu/alpine over centos 7, as they had multi-platform images available where centos 7 we were stuck only working builds for amd64/arm64.
New additions
🚧- Your mileage may vary with new platforms ⚠️ - openssl 1.1 based builds have been dropped, so nothing earlier than 3.1.4 for linux/macos
Check out the pre-release here
Platform | Architecture | Musl | Glibc |
---|---|---|---|
ARMv8 64-bit (arm64v8 ) |
ARMv8 | ✅ | ✅ |
Linux x86-64 (amd64 ) |
x86-64 | ✅ | ✅ |
x86/i686 (i386 ) |
x86/i686 | ✅ | ✅ |
IBM z Systems (s390x ) |
z Systems | ✅ | ✅ |
IBM POWER8 (ppc64le ) |
POWER8 | ✅ | ✅ |
RISC-V 64-bit (riscv64 ) |
RISC-V | ✅ | ✅ |
Platform | Architecture | Supported |
---|---|---|
MacOS x86-64 (darwin-x86_64 ) |
x86-64 | ✅ |
MacOS arm64 (darwin-arm64 ) |
arm64 | ✅ |
Platform | Architecture | Supported |
---|---|---|
Windows x86-64 (windows-x86_64 ) |
x86-64 | ✅ |
Windows x86 (windows-x86 ) |
x86 | ✅ |
Windows arm64 (windows-arm64 ) |
arm64 | 🚧 |
Also I've been working on a traveling-ruby app builder built in rust, for end users, that will package up their app for any or all of the supported TR platforms.
Rust supports embedding files (so an archive) or directory (with rust-embed), and I've managed to eliminate the need for end users app wrappers, by directly invoking the ruby binary with the correct TR environment variables setup.
This means you can distribute your ruby app as a single file which self-extracts its contents and then executes.
It's similar in vein for ocra / ruby_packer which provide a single entry point, however each of those unpack to a temporary directory, which affects speeds (it takes a short while to unpack it every time, and that seems expensive for our use case, cli invocations of which there are highly likely to multiple in quick succession)
In order to support native extensions for windows in my end users app, I cheated a little bit, I used ocran, exploded the temp directory and provided a new wrapper script.
Not sure if it will be of use to others, but it's been scratching my itch of getting to learn more rust and made it easy for me to test out the new TR combos
Also I've been working on a traveling-ruby app builder built in rust, for end users, that will package up their app for any or all of the supported TR platforms.
Rust supports embedding files (so an archive) or directory (with rust-embed), and I've managed to eliminate the need for end users app wrappers, by directly invoking the ruby binary with the correct TR environment variables setup.
This means you can distribute your ruby app as a single file which self-extracts its contents and then executes.
It's similar in vein for ocra / ruby_packer which provide a single entry point, however each of those unpack to a temporary directory, which affects speeds (it takes a short while to unpack it every time, and that seems expensive for our use case, cli invocations of which there are highly likely to multiple in quick succession)
In order to support native extensions for windows in my end users app, I cheated a little bit, I used ocran, exploded the temp directory and provided a new wrapper script.
Not sure if it will be of use to others, but it's been scratching my itch of getting to learn more rust and made it easy for me to test out the new TR combos
That really sounds great! Thank you so much for all the effort!
builds all the rubies for all the things
Fork:- https://github.com/YOU54F/traveling-ruby
background https://github.com/phusion/traveling-ruby/pull/133#issuecomment-1579665334
Travelling ruby updates for arm64/aarch64
macos x86_64 binaries work as far back at 10.15 Catalina.
10.14 Mojave fails on libgmp