From 5f220263b031dfbef123e3ea3e65295935c91aaf Mon Sep 17 00:00:00 2001 From: Lucas Walter Date: Thu, 28 Aug 2025 17:43:27 -0700 Subject: [PATCH 1/3] run action on ubuntu --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3eeb00..6f71d05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,8 @@ jobs: os: [windows-latest, ubuntu-latest] rust_version: [stable] build_flags: ["", "--features double-precision", "--features object-layer-u32", "--all-features"] - exclude: - - os: ubuntu-latest + # exclude: + # - os: ubuntu-latest runs-on: ${{ matrix.os }} name: Tests - ${{ matrix.os }} ${{ matrix.rust_version }} ${{ matrix.build_flags }} From 390a42924bc3d4343206d79c5d249c6494c91c36 Mon Sep 17 00:00:00 2001 From: Lucas Walter Date: Thu, 28 Aug 2025 18:57:48 -0700 Subject: [PATCH 2/3] need to link in joltc libraries in hello-world and hello-world-sys --- crates/hello-world-sys/build.rs | 4 ++++ crates/hello-world/build.rs | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 crates/hello-world-sys/build.rs create mode 100644 crates/hello-world/build.rs diff --git a/crates/hello-world-sys/build.rs b/crates/hello-world-sys/build.rs new file mode 100644 index 0000000..141e75c --- /dev/null +++ b/crates/hello-world-sys/build.rs @@ -0,0 +1,4 @@ +fn main() { + println!("cargo:rustc-link-lib=Jolt"); + println!("cargo:rustc-link-lib=joltc"); +} diff --git a/crates/hello-world/build.rs b/crates/hello-world/build.rs new file mode 100644 index 0000000..141e75c --- /dev/null +++ b/crates/hello-world/build.rs @@ -0,0 +1,4 @@ +fn main() { + println!("cargo:rustc-link-lib=Jolt"); + println!("cargo:rustc-link-lib=joltc"); +} From afa6a6022a1334c6ccbb8982ec51e9082620f8eb Mon Sep 17 00:00:00 2001 From: Lucas Walter Date: Thu, 28 Aug 2025 20:19:42 -0700 Subject: [PATCH 3/3] cargo test is very sensitive to the link order (on linux), it has to be in this new position --- crates/joltc-sys/build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/joltc-sys/build.rs b/crates/joltc-sys/build.rs index dc88c67..99af7de 100644 --- a/crates/joltc-sys/build.rs +++ b/crates/joltc-sys/build.rs @@ -7,7 +7,6 @@ fn main() { let flags = build_flags(); build_joltc(); - link(); generate_bindings(&flags).unwrap(); } @@ -68,6 +67,8 @@ fn build_joltc() { dst.push("lib64"); println!("cargo:rustc-link-search=native={}", dst.display()); + link(); + // On macOS and Linux, we need to explicitly link against the C++ standard // library here to avoid getting missing symbol errors from Jolt/JoltC. if cfg!(target_os = "macos") { @@ -80,8 +81,8 @@ fn build_joltc() { } fn link() { - println!("cargo:rustc-link-lib=Jolt"); println!("cargo:rustc-link-lib=joltc"); + println!("cargo:rustc-link-lib=Jolt"); } /// Generate build flags specifically for generating bindings.