Skip to content

Research: take Linux and Windows ONNX Runtime from NuGet - #1657

Merged
AnthonyRonning merged 1 commit into
masterfrom
research-onnxruntime-nuget
Nov 19, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
research-onnxruntime-nuget

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Linux and Windows builds of Research now get ONNX Runtime from Microsoft's official NuGet package instead of a GitHub release archive. The library pins do not change.

Why

github.com/microsoft/onnxruntime and its release downloads return 404 (still the case on November 19, 2026). The desktop providers download a release archive on every fresh checkout, so each of these fails before it builds or tests anything:

  • research-rust, on any pull request that touches apps/maple-research/frontend/src-tauri/
  • Research desktop builds on Linux and Windows, release builds included

master has stayed green only because no run since then selected one of those lanes.

Change

provide-linux-onnxruntime.sh and provide-windows-onnxruntime.sh download Microsoft.ML.OnnxRuntime 1.23.2 from nuget.org (published October 25, 2025), check it against a new package pin, and extract the one library they need to the path it had before. The existing check of that library against its own pin is untouched, so a different binary still fails the build.

The libraries in the package are byte-identical to the ones the release archives carried:

Library SHA-256 in the NuGet package Existing pin
Linux x64 libonnxruntime.so 13ab8084…74c68b same
Linux aarch64 libonnxruntime.so 648ffa64…44c286 same
Windows x64 onnxruntime.dll dec964ab…84f1ea same

The three archive pins are removed because nothing reads them now. The extracted folder holds only the library; the headers, CMake files and import library from the archives were never used, since the desktop build loads ONNX Runtime at run time.

The package is 118 MB, larger than the archives it replaces. A fresh provision took under two seconds on a fast connection.

Not in this change

  • macOS still downloads from GitHub and still fails on a fresh checkout. The NuGet package has the same code (each architecture has the same code-directory hash as the matching half of the pinned universal library, and a valid Microsoft Developer ID signature), but Microsoft signed those files separately, so the file hashes differ from the pin. Accepting them means new pins, which is a separate decision.
  • iOS builds ONNX Runtime from source out of the same repository. It works only while its cached build is available.
  • Android uses Maven Central and is unaffected.

Checked

  • The Linux provider end to end on an arm64 Mac (it takes the aarch64 path): real download, package pin, extraction, library pin.
  • The Linux x64 and Windows paths against the same downloaded package, with the network call replaced by a local copy: both libraries match their pins.
  • Failure cases: a truncated package is refused by the package pin and leaves no files behind; a wrong library already in place is refused by the library pin; a version with no pins stops before any download; a second run downloads nothing.
  • Research's pre-commit checks (format, Clippy, 93 Rust tests).

Not checked: the Windows provider under Git Bash on Windows. That lane runs only with the ci:package label, which would also run the macOS desktop lane, and that one still fails at its download.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The GitHub repository these providers downloaded release archives from
returns 404, so every fresh Linux or Windows provision fails before a
build or test starts.

Both providers now extract the library from Microsoft's official
Microsoft.ML.OnnxRuntime NuGet package for the same version. The
libraries in that package are byte-identical to the ones in the release
archives, so the existing library pins are unchanged and still decide
whether a build proceeds. The package itself gets its own pin, which
replaces the three archive pins nothing reads any more.

macOS is unchanged and still downloads from GitHub.

Co-Authored-By: Claude <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit 0df75c6 into master Nov 19, 2026
21 checks passed
@AnthonyRonning
AnthonyRonning deleted the research-onnxruntime-nuget branch November 19, 2026 17:17
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.

1 participant