IronRuby 4.0.0
IronRuby is back: Ruby 4.0 on .NET 8 and 10. The last release of IronRuby was 1.1.3,
for Ruby 1.9.2 on .NET Framework 4, in 2011. 4.0.0 implements Ruby 4.0, parses it with
prism (CRuby's own parser), and runs on Linux, Windows and
macOS.
Download
The archives below are self-contained: unpack one and run ir.sh / ir.cmd, irb,
igem. No .NET to install.
- Windows x64:
ironruby-4.0.0-win-x64.zip, with Windows Forms, WPF and
Samples\Notepad\notepad.cmd, a Windows Notepad written in Ruby - Linux x64:
ironruby-4.0.0-linux-x64.tar.gz - macOS arm64:
ironruby-4.0.0-osx-arm64.tar.gz(untested)
SHA256SUMS lists the checksums; ironruby-4-launch.mp4 is the launch video.
What is in it
- Ruby 4.0 syntax, read by prism: pattern matching, endless methods,
it, keyword
arguments,...forwarding. prism's syntax tree is decoded by a generated C# loader
(152 node classes) and lowered onto IronRuby's AST and the DLR. - ruby/spec at CRuby 4.0.6:
spec/language2,934 examples andspec/library6,398,
both with 0 failures;spec/command_lineandspec/securityat 0 as well;spec/core
21 of 23,136, 20 of themObjectSpace.each_object. - A method JIT and OSR, on by default, specializing on the types a program uses:
integer and float loops,fibandmandelbrotrun in 0.27–0.74× CRuby's time. The
geomean over all 50 benchmarks is 3.25×: method calls, strings and arrays are 2–4×, and
raiseand fibers are far behind. - irb 1.16.0 and reline 0.6.3, the ones CRuby 4.0 ships, with highlighting, completion
and history. RubyGems 4.0.16 and Bundler, installing over real TLS. Ruby 4.0's standard
library and its pure-Ruby bundled gems ship in the box. - Rails 8.1 boots and serves requests through Rack, with nokogiri, a C extension,
stubbed; ActiveRecord has no adapter yet, assqlite3,pgandmysql2are native. - .NET is right there:
require "System.Windows.Forms"or"PresentationFramework".
Samples/Notepadis
Windows Notepad in 1,365 lines of Ruby, with a test that drives it in CI. irubycpackages a Ruby program as an application, as one executable
(--single-file), or as a plugin DLL a .NET host loads (--library).
Not yet
zlib, Win32OLE and readline on Windows, C extensions in general (no nokogiri, no
database drivers), and macOS is built but untested. The
README has the full status.
Thanks to everyone who built IronRuby at Microsoft and in IronLanguages, and to the prism
and ruby/spec projects, without which none of this would be measurable.
Music in the launch video: Edvard Grieg, In the Hall of the Mountain King, played by the
Czech National Symphony Orchestra for Musopen; public domain, from
classicals.de.
What's Changed
- A Ruby string prefers System::String over System::Byte[] in overload resolution by @Largo in #4
- A Ruby string prefers System::String over System::Boolean in overload resolution by @Largo in #5
- Clear the CI build warnings (142 compiler warnings, NuGet, Node 20) by @Largo in #6
- Time: a zone name loaded from a dump is dumped again and printed by %Z by @Largo in #7
- Windows Forms and WPF on .NET 8: ship the Windows Desktop runtime by @Largo in #3
- Samples/Notepad: Windows Notepad in Ruby, on Windows Forms, with a test CI runs by @Largo in #8
- IronRuby 4.0.0: version, downloads, social card and launch video by @Largo in #9
Full Changelog: v4.0.0-preview1...v4.0.0
