From f8b1d33d6b3b4a180883f16a152d6029bb5c305b Mon Sep 17 00:00:00 2001 From: AkshatRai07 Date: Wed, 22 Jul 2026 16:56:48 +0530 Subject: [PATCH 1/7] Fixed MacOS linking issue --- crates/ekore_capi/tests/run_tests.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ekore_capi/tests/run_tests.sh b/crates/ekore_capi/tests/run_tests.sh index 4d6a424a1..ac0fb3980 100755 --- a/crates/ekore_capi/tests/run_tests.sh +++ b/crates/ekore_capi/tests/run_tests.sh @@ -33,6 +33,11 @@ run_section() { echo " Compiling $name.$ext..." "$compiler" "$src" "${extra[@]}" \ -L"$LIB_DIR" -lekore_capi -o "$bin" -Wl,-rpath,"$RPATH" + + # macOS: cargo-c bakes an absolute /lib/... install name; fix it to @rpath + [ "$(uname)" = "Darwin" ] && install_name_tool -change \ + "/lib/libekore_capi.0.0.1.dylib" "@rpath/libekore_capi.0.0.1.dylib" "$bin" 2>/dev/null || true + echo " Running $name..." "$bin" rm -f "$bin" From 2c4160bd4a10080088161136ff71cc609d9f7b5a Mon Sep 17 00:00:00 2001 From: AkshatRai07 Date: Wed, 22 Jul 2026 17:03:01 +0530 Subject: [PATCH 2/7] Removed staticlib --- crates/ekore_capi/Cargo.toml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ekore_capi/Cargo.toml b/crates/ekore_capi/Cargo.toml index 175b1eb7b..26befe099 100644 --- a/crates/ekore_capi/Cargo.toml +++ b/crates/ekore_capi/Cargo.toml @@ -17,7 +17,7 @@ exclude = ["tests"] rustdoc-args = ["--html-in-header", "doc-header.html"] [lib] -crate-type = ["cdylib", "staticlib"] +crate-type = ["cdylib"] [features] capi = [] diff --git a/pyproject.toml b/pyproject.toml index 22924b260..0d085b03f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -154,7 +154,7 @@ rtest = "cargo test --workspace" fmtcheck = "cargo fmt --all -- --check" clippy = "cargo clippy --no-deps" rbib = { "shell" = "python crates/make_bib.py > crates/ekore/src/bib.rs" } -build-capi = "cargo cinstall --release -p ekore_capi --destdir=./crates/ekore_capi/dist --prefix=/ --libdir=/lib --includedir=/include" +build-capi = "cargo cinstall --release --library-type cdylib -p ekore_capi --destdir=./crates/ekore_capi/dist --prefix=/ --libdir=/lib --includedir=/include" ctest = "./crates/ekore_capi/tests/run_tests.sh" [tool.pytest.ini_options] From 45fe7a86daae6b3c4f96f62d67626080929fe1c1 Mon Sep 17 00:00:00 2001 From: AkshatRai07 Date: Thu, 23 Jul 2026 18:14:18 +0530 Subject: [PATCH 3/7] Fixed ekors versioning --- crates/eko/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/eko/pyproject.toml b/crates/eko/pyproject.toml index 3c032645c..139adc220 100644 --- a/crates/eko/pyproject.toml +++ b/crates/eko/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "eko-rs" -version = "0.0.0" +dynamic = ["version"] requires-python = ">=3.11" classifiers = [ "Programming Language :: Rust", From f0123ea1c8b077c424ac7b23fb6d280eb2eb474c Mon Sep 17 00:00:00 2001 From: AkshatRai07 Date: Thu, 23 Jul 2026 18:18:18 +0530 Subject: [PATCH 4/7] Changed run test for variable file name --- crates/ekore_capi/tests/run_tests.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ekore_capi/tests/run_tests.sh b/crates/ekore_capi/tests/run_tests.sh index ac0fb3980..f7e15fb88 100755 --- a/crates/ekore_capi/tests/run_tests.sh +++ b/crates/ekore_capi/tests/run_tests.sh @@ -35,8 +35,10 @@ run_section() { -L"$LIB_DIR" -lekore_capi -o "$bin" -Wl,-rpath,"$RPATH" # macOS: cargo-c bakes an absolute /lib/... install name; fix it to @rpath - [ "$(uname)" = "Darwin" ] && install_name_tool -change \ - "/lib/libekore_capi.0.0.1.dylib" "@rpath/libekore_capi.0.0.1.dylib" "$bin" 2>/dev/null || true + if [ "$(uname)" = "Darwin" ]; then + old="$(otool -L "$bin" | awk '/\/lib\/libekore_capi/{print $1; exit}')" + [ -n "$old" ] && install_name_tool -change "$old" "@rpath/$(basename "$old")" "$bin" + fi echo " Running $name..." "$bin" From 99e32fb7ad342f67c72d0c9c7f1a1cd7fdcd81b4 Mon Sep 17 00:00:00 2001 From: AkshatRai07 Date: Mon, 27 Jul 2026 21:23:50 +0530 Subject: [PATCH 5/7] Added MacOS in tests --- .github/workflows/unittests-capi.yml | 6 +++++- .github/workflows/unittests-rust.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittests-capi.yml b/.github/workflows/unittests-capi.yml index aeee63379..bfea44a7c 100644 --- a/.github/workflows/unittests-capi.yml +++ b/.github/workflows/unittests-capi.yml @@ -4,7 +4,11 @@ on: push jobs: test-capi: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Setup Python diff --git a/.github/workflows/unittests-rust.yml b/.github/workflows/unittests-rust.yml index 65bc707c9..2eae03808 100644 --- a/.github/workflows/unittests-rust.yml +++ b/.github/workflows/unittests-rust.yml @@ -4,7 +4,11 @@ on: push jobs: test: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Get test data From 1f1144fedc9ac751d463df9a97a3eed0c4394766 Mon Sep 17 00:00:00 2001 From: AkshatRai07 Date: Mon, 27 Jul 2026 22:32:57 +0530 Subject: [PATCH 6/7] Fixed bash env --- tests/data/assets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data/assets.sh b/tests/data/assets.sh index 66007ee98..f2e20eb60 100755 --- a/tests/data/assets.sh +++ b/tests/data/assets.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/bin/env bash # This script downloads the test assets to run both Rust and Python unit tests. # The script is to be executed in the root directory of the repository. From e883fbe92b1ce276fd4d18c2d8a42da661e3f337 Mon Sep 17 00:00:00 2001 From: AkshatRai07 Date: Mon, 27 Jul 2026 22:37:05 +0530 Subject: [PATCH 7/7] Fixed gsl installation --- .github/workflows/unittests-rust.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittests-rust.yml b/.github/workflows/unittests-rust.yml index 2eae03808..480272cf3 100644 --- a/.github/workflows/unittests-rust.yml +++ b/.github/workflows/unittests-rust.yml @@ -30,8 +30,12 @@ jobs: - name: Run clippy run: | poe clippy - - name: Install gsl - run: sudo apt-get install libgsl0-dev + - name: Install gsl (Linux) + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y libgsl0-dev + - name: Install gsl (macOS) + if: runner.os == 'macOS' + run: brew install gsl - name: Run Rust unit tests run: | poe rtest