From ab6638a060a65846c61cd83206dc65b653fff04b Mon Sep 17 00:00:00 2001 From: Reid Morrison Date: Tue, 3 Nov 2026 08:12:10 -0500 Subject: [PATCH] Pin Rust 1.99 in Linux CI until ort supports Rust 1.100 Rust 1.100 (due 2026-11-12) ships cargo's new build-dir layout. The copy-dylibs step in ort-sys 2.0.0-rc.8 cannot handle it, so any build that links ONNX Runtime dynamically fails in the ort-sys build script. That includes the cuda/tensorrt features, which config/config.exs enables for the Linux CI job. Static CPU builds, the default for apps that depend on Ortex, are not affected. Pin the Linux job to Rust 1.99.1 and note the limitation in the README. The macOS job (static CoreML build) keeps using the runner's latest Rust. Remove the pin once ort is upgraded (rc.14 and later support the new layout). --- .github/workflows/ci.yml | 4 ++++ README.md | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a97f4a..e5953fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,10 @@ jobs: with: otp-version: ${{ matrix.otp }} elixir-version: ${{ matrix.elixir }} + # ort 2.0.0-rc.8 fails to build the CUDA/TensorRT variant on Rust 1.100+ + # (new cargo build-dir layout). Remove once ort is upgraded. + - name: Pin Rust 1.99 + run: rustup toolchain install 1.99.1 --profile minimal && rustup default 1.99.1 - name: Install dependencies run: mix deps.get - name: Compile and check warnings diff --git a/README.md b/README.md index 53c54fc..c7e0835 100644 --- a/README.md +++ b/README.md @@ -62,3 +62,8 @@ end ``` You will need [Rust](https://www.rust-lang.org/tools/install) for compilation to succeed. + +Builds that link ONNX Runtime dynamically, which includes the `cuda` and `tensorrt` features, +fail to compile with Rust 1.100 and later because of the `ort` version Ortex currently uses. +Until `ort` is upgraded, use Rust 1.99 for these builds, for example by running +`rustup override set 1.99.1` in your project directory.