Skip to content

Commit de7a27c

Browse files
FFI version 0.12.76, clang compatibility changes (#255)
Updates to livekit-ffi 0.12.76, bringing in: * Upgrades libwebrtc to M150 * More reliable TURN/TLS conne ctions via OS trust-store fallback * Automatic retry for WebRTC build downloads * WARP transport features enabled by default when supported by the server * Token handling moved into a dedicated crate, with fixes for service-only feature builds Fixes some clang compatibility issues the upstream introduced as part of libwebrtc version change
1 parent c77ec12 commit de7a27c

4 files changed

Lines changed: 48 additions & 13 deletions

File tree

‎.github/workflows/builds.yml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ jobs:
125125
libcurl4-openssl-dev \
126126
libwayland-dev libdecor-0-dev
127127
128+
# The libwebrtc artifact ships a hermetic libc++ built from LLVM trunk.
129+
# Distro clang (14 on Ubuntu 22.04, 18 on 24.04) cannot compile its
130+
# headers; the submodule script installs LLVM 21 and exports CC/CXX.
131+
- name: Install clang for libwebrtc
132+
if: runner.os == 'Linux'
133+
shell: bash
134+
run: client-sdk-rust/.github/scripts/install-clang.sh
135+
128136
- name: Install deps (macOS)
129137
if: runner.os == 'macOS'
130138
run: |
@@ -191,8 +199,9 @@ jobs:
191199
run: |
192200
echo "CXXFLAGS=-Wno-deprecated-declarations" >> "$GITHUB_ENV"
193201
echo "CFLAGS=-Wno-deprecated-declarations" >> "$GITHUB_ENV"
194-
LLVM_VERSION=$(llvm-config --version | cut -d. -f1)
195-
echo "LIBCLANG_PATH=/usr/lib/llvm-${LLVM_VERSION}/lib" >> "$GITHUB_ENV"
202+
LLVM_ROOT="$(dirname "${CXX}")/.."
203+
test -f "${LLVM_ROOT}/lib/libclang.so"
204+
echo "LIBCLANG_PATH=${LLVM_ROOT}/lib" >> "$GITHUB_ENV"
196205
197206
# ---------- Build ----------
198207
- name: Build (Unix)

‎.github/workflows/make-release.yml‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ jobs:
125125
libcurl4-openssl-dev \
126126
libwayland-dev libdecor-0-dev
127127
128+
# The libwebrtc artifact ships a hermetic libc++ built from LLVM trunk.
129+
# Distro clang cannot compile its headers; install the same LLVM version
130+
# used by the Linux build and test workflows.
131+
- name: Install clang for libwebrtc
132+
if: runner.os == 'Linux'
133+
shell: bash
134+
run: client-sdk-rust/.github/scripts/install-clang.sh
135+
128136
- name: Install deps (macOS)
129137
if: runner.os == 'macOS'
130138
run: |
@@ -185,10 +193,11 @@ jobs:
185193
- name: Set Linux build environment
186194
if: runner.os == 'Linux'
187195
run: |
188-
echo "CXXFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV
189-
echo "CFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV
190-
LLVM_VERSION=$(llvm-config --version | cut -d. -f1)
191-
echo "LIBCLANG_PATH=/usr/lib/llvm-${LLVM_VERSION}/lib" >> $GITHUB_ENV
196+
echo "CXXFLAGS=-Wno-deprecated-declarations" >> "$GITHUB_ENV"
197+
echo "CFLAGS=-Wno-deprecated-declarations" >> "$GITHUB_ENV"
198+
LLVM_ROOT="$(dirname "${CXX}")/.."
199+
test -f "${LLVM_ROOT}/lib/libclang.so"
200+
echo "LIBCLANG_PATH=${LLVM_ROOT}/lib" >> "$GITHUB_ENV"
192201
193202
# ---------- Build + Bundle (Unix) ----------
194203
- name: Build and Bundle (Unix)

‎.github/workflows/tests.yml‎

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ jobs:
229229
libwayland-dev libdecor-0-dev \
230230
gdb jq
231231
232+
# The libwebrtc artifact ships a hermetic libc++ built from LLVM trunk.
233+
# Distro clang (14 on Ubuntu 22.04, 18 on 24.04) cannot compile its
234+
# headers; the submodule script installs LLVM 21 and exports CC/CXX.
235+
- name: Install clang for libwebrtc
236+
if: runner.os == 'Linux'
237+
shell: bash
238+
run: client-sdk-rust/.github/scripts/install-clang.sh
239+
232240
- name: Install deps (macOS)
233241
if: runner.os == 'macOS'
234242
run: |
@@ -291,8 +299,9 @@ jobs:
291299
run: |
292300
echo "CXXFLAGS=-Wno-deprecated-declarations" >> "$GITHUB_ENV"
293301
echo "CFLAGS=-Wno-deprecated-declarations" >> "$GITHUB_ENV"
294-
LLVM_VERSION=$(llvm-config --version | cut -d. -f1)
295-
echo "LIBCLANG_PATH=/usr/lib/llvm-${LLVM_VERSION}/lib" >> "$GITHUB_ENV"
302+
LLVM_ROOT="$(dirname "${CXX}")/.."
303+
test -f "${LLVM_ROOT}/lib/libclang.so"
304+
echo "LIBCLANG_PATH=${LLVM_ROOT}/lib" >> "$GITHUB_ENV"
296305
297306
- name: Configure Unix crash diagnostics
298307
if: runner.os != 'Windows'
@@ -511,6 +520,12 @@ jobs:
511520
libwayland-dev libdecor-0-dev
512521
pip install --break-system-packages gcovr
513522
523+
# The coverage build compiles the Rust FFI too, so it needs the same
524+
# compiler floor as the normal Linux build/test matrices.
525+
- name: Install clang for libwebrtc
526+
shell: bash
527+
run: client-sdk-rust/.github/scripts/install-clang.sh
528+
514529
# ---------- Rust toolchain ----------
515530
- name: Install Rust (stable)
516531
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
@@ -544,10 +559,12 @@ jobs:
544559
# ---------- Build environment setup ----------
545560
- name: Set build environment
546561
run: |
547-
LLVM_VERSION=$(llvm-config --version | cut -d. -f1)
548-
echo "LIBCLANG_PATH=/usr/lib/llvm-${LLVM_VERSION}/lib" >> "$GITHUB_ENV"
549-
GCC_VER=$(gcc -dumpversion | cut -d. -f1)
550-
echo "GCOV_EXECUTABLE=gcov-${GCC_VER}" >> "$GITHUB_ENV"
562+
LLVM_ROOT="$(dirname "${CXX}")/.."
563+
test -f "${LLVM_ROOT}/lib/libclang.so"
564+
LLVM_COV="${LLVM_ROOT}/bin/llvm-cov"
565+
test -x "${LLVM_COV}"
566+
echo "LIBCLANG_PATH=${LLVM_ROOT}/lib" >> "$GITHUB_ENV"
567+
echo "GCOV_EXECUTABLE=${LLVM_COV} gcov" >> "$GITHUB_ENV"
551568
552569
# ---------- Configure with upstream preset + coverage flag overrides ----------
553570
- name: Configure (linux-debug-tests preset + coverage flags)

‎client-sdk-rust‎

0 commit comments

Comments
 (0)