From d2c91eab458bd1e10f0843bfb8ee325243d1d8f0 Mon Sep 17 00:00:00 2001 From: Tom Ballard Date: Sun, 30 Aug 2026 15:49:11 +0100 Subject: [PATCH] fix(release): support Linux ARM64 builds Cast libyaml's problem pointer to the target-native c_char type and exercise the shipped binaries on an ARM64 runner. Signed-off-by: Tom Ballard --- .github/workflows/rust-spike.yml | 20 ++++++++++++++++++++ rust/rac-engine/src/federation.rs | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-spike.yml b/.github/workflows/rust-spike.yml index dd06086b..701bc620 100644 --- a/.github/workflows/rust-spike.yml +++ b/.github/workflows/rust-spike.yml @@ -31,6 +31,26 @@ on: - ".github/workflows/rust-spike.yml" jobs: + linux-arm64-build: + name: Linux ARM64 release build + runs-on: ubuntu-24.04-arm + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + + - name: Install rust toolchain (pinned by rust/rust-toolchain.toml) + run: rustup show + + - uses: Swatinem/rust-cache@v2 + with: + workspaces: rust + + - name: Build shipped native binaries + working-directory: rust + run: cargo build --release --locked -p decided -p decided-mcp + windows-runtime: name: Windows native runtime smoke runs-on: windows-latest diff --git a/rust/rac-engine/src/federation.rs b/rust/rac-engine/src/federation.rs index 5cfc19de..375a4046 100644 --- a/rust/rac-engine/src/federation.rs +++ b/rust/rac-engine/src/federation.rs @@ -971,7 +971,7 @@ fn scan_yaml_events(yaml: &str) -> Result, Stri } else { // SAFETY: libyaml exposes a NUL-terminated problem string while // the parser is alive. - unsafe { CStr::from_ptr(parser.0.problem) } + unsafe { CStr::from_ptr(parser.0.problem.cast()) } .to_string_lossy() .into_owned() };