Skip to content

Add mswin engine with builds from cache.ruby-lang.org - #971

Open
hsbt wants to merge 8 commits into
masterfrom
claude/mswin-build-binaries-53f9a3
Open

hsbt wants to merge 8 commits into
masterfrom
claude/mswin-build-binaries-53f9a3

Conversation

@hsbt

@hsbt hsbt commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

ruby-version: mswin installs the ruby-loco master build, which has not been updated since 2026-10-14 because its mswin workflow fails every day. #969 removes mingw for the same kind of reason.

I publish mswin builds at https://cache.ruby-lang.org/pub/ruby/binaries/mswin64/ for stable releases and for master daily, and I will keep maintaining them. This adds mswin as an engine with 3.4 to 4.0 and head, and points mswin at the new master build. The default Windows builds stay RubyInstaller.

- uses: ruby/setup-ruby@v1
  with:
    ruby-version: mswin-4.0 # or mswin-head, mswin

SSL_CERT_FILE is set to Git's CA bundle for mswin, because the OpenSSL in these builds has no usable trust anchors on the runners.

I think plain mswin should mean the latest stable release like ruby and jruby, and I'd like to change that in a follow-up if you agree.

Generated with Claude Code

hsbt and others added 3 commits November 11, 2026 13:23
The ruby-loco mswin build has not been updated since 2026-10-14. The mswin engine uses the builds published at cache.ruby-lang.org instead. `mswin` stays the master build as `mswin-head`, which picks the latest one from index.json at runtime.

Only 3.4 and later are provided, because the packages of 3.3 and earlier reject the MSVC version of the runners or ship bin stubs that do not run from bash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The OpenSSL in the mswin builds looks for CA certificates in an OPENSSLDIR that does not exist on the runners, so certificate verification fails without it. A missing bundle only warns, because its path on windows-11-arm is not confirmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mswin builds are downloaded from cache.ruby-lang.org, which does not take the token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt force-pushed the claude/mswin-build-binaries-53f9a3 branch from 423acc9 to db08eaf Compare November 11, 2026 04:24
@ntkme

ntkme commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

I wonder if it will be better to make a breaking change and have mswin points to latest stable release just like ruby points to latest stable release if we are adding mswin-head.

@hsbt

hsbt commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

I agree. As it is a breaking change, I'd like to hear from @eregon before changing it in this PR.

Comment thread generate-windows-versions.rb Resolved
Comment thread generate-windows-versions.rb Resolved
ntkme and others added 3 commits November 10, 2026 22:17
setup-msys2-gcc renamed the platform of the arm64 vcpkg packages from aarch64-mswin64 to arm64-mswin64.

ruby/setup-msys2-gcc#42

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread windows.js Resolved
hsbt and others added 2 commits November 11, 2026 16:10
A missing bundle now fails the setup, so it is reported there rather than as a certificate error later. The bundle is found on every runner image, windows-11-arm included.

#971 (comment)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ntkme
ntkme requested a review from eregon November 12, 2026 18:17
Comment thread common.js

export function isBundler1Default(engine, rubyVersion) {
if (engine === 'ruby') {
if (isCRuby(engine)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite error-prone as engine === 'ruby' has always been used and might be in the future.
Not sure what's a good solution though.

@ntkme ntkme Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another approach I can think of that is potentially less error-prone is to make this more object oriented. E.g. introduce a class RubyVersion. If we only pass the object around, and only call the instance method provided by the class, so there is less chance to have errors?

class RubyVersion {
  constructor(rubyVersion) {
    ...
  }
  get engine() {
    ...
  }
  get isCRuby() {
    ...
  }
  get version() {
    ...
  }
  get floatVersion() {
    ...
  }
}

@eregon

eregon commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

I'll think a bit about this.

I agree if we add those names that it would be natural for mswin to be the last release (because mswin becomes an engine, it was a version before).
It's not great that we'd change the meaning of mswin though, both in what version it resolves though and where it pulls builds from, users might not expect that.
There are rather few public usages.

I would like to know more about the longer-term plans for those builds.
For example it seems https://www.ruby-lang.org/en/documentation/installation/ doesn't mention them.
Is the goal they become the recommended way to install on Windows?
To always keep 2 options with RubyInstaller & these builds?
What would be the advantages of using these builds over RubyInstaller which is the best-established builds on Windows?

I'm unsure it's worth having 2 variants of builds on Windows.

Comment thread README.md
| ----------- | -------- |
| `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 4.1.0-preview1, head, debug, mingw, mswin, ucrt |
| `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 4.1.0-preview1, head, debug, mingw, ucrt |
| `mswin` | 3.4.11 - 4.0.9, head (Windows only) |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mswin isn't really an interpreter so this reads a bit strange.

@eregon

eregon commented Nov 13, 2026

Copy link
Copy Markdown
Member

Relevant ticket: https://bugs.ruby-lang.org/issues/22180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants