Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ https://x.com/livekit
https://x.com/*
https://twitter.com/livekit
https://twitter.com/*

# YouTube's response headers exceed Lychee's HTTP/2 header limit.
^https://www\.youtube\.com/@livekit_io$
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ file(GLOB_RECURSE RUST_SOURCES CONFIGURE_DEPENDS
"${RUST_ROOT}/livekit-ffi/protocol/*.proto"
"${RUST_ROOT}/livekit-ffi/build.rs"
"${RUST_ROOT}/livekit-ffi/Cargo.toml"
"${RUST_ROOT}/livekit/src/*.rs"
"${RUST_ROOT}/livekit/build.rs"
"${RUST_ROOT}/livekit/Cargo.toml"
"${RUST_ROOT}/livekit-common/src/*.rs"
"${RUST_ROOT}/livekit-common/Cargo.toml"
"${RUST_ROOT}/livekit-datatrack/src/*.rs"
"${RUST_ROOT}/livekit-datatrack/Cargo.toml"
"${RUST_ROOT}/livekit-capture/Cargo.toml"
"${RUST_ROOT}/livekit-capture/src/*"
"${RUST_ROOT}/livekit-capture/shaders/*"
Expand Down Expand Up @@ -500,10 +507,6 @@ target_sources(livekit PRIVATE
$<TARGET_OBJECTS:livekit_proto>
$<TARGET_OBJECTS:livekit_uniffi_cpp>
)
set_source_files_properties(
${LIVEKIT_ROOT_DIR}/src/uniffi_bindgen_adapter.cpp
PROPERTIES OBJECT_DEPENDS ${LIVEKIT_UNIFFI_CPP_HEADER}
)

target_include_directories(livekit
PUBLIC
Expand Down Expand Up @@ -545,7 +548,7 @@ target_compile_definitions(livekit

message(STATUS "Protobuf: version=${Protobuf_VERSION}; protoc=${Protobuf_PROTOC_EXECUTABLE}")

add_dependencies(livekit build_rust_ffi)
add_dependencies(livekit build_rust_ffi generate_livekit_ffi_uniffi_cpp)

if(LIVEKIT_IS_TOPLEVEL)
# Copy public headers and build-local feature metadata to build/include
Expand Down
2 changes: 1 addition & 1 deletion client-sdk-rust
Submodule client-sdk-rust updated 49 files
+0 −276 .github/scripts/changeset_detect.py
+0 −286 .github/scripts/test_changeset_detect.py
+8 −221 .github/workflows/changeset-check.yml
+206 −71 .github/workflows/ffi-builds.yml
+47 −1 .github/workflows/node-builds.yml
+46 −0 .github/workflows/release-pr.yml
+154 −14 .github/workflows/release.yml
+15 −6 .github/workflows/uniffi-dart-publish.yml
+20 −16 .github/workflows/uniffi-packages.yml
+11 −7 AGENTS.md
+3 −3 Cargo.lock
+3 −3 Cargo.toml
+0 −220 knope.toml
+7 −0 livekit-capture/CHANGELOG.md
+1 −1 livekit-capture/Cargo.toml
+1 −1 livekit-ffi-node-bindings/npm/darwin-arm64/package.json
+1 −1 livekit-ffi-node-bindings/npm/darwin-x64/package.json
+1 −1 livekit-ffi-node-bindings/npm/linux-arm64-gnu/package.json
+1 −1 livekit-ffi-node-bindings/npm/linux-x64-gnu/package.json
+1 −1 livekit-ffi-node-bindings/npm/win32-x64-msvc/package.json
+1 −1 livekit-ffi-node-bindings/package.json
+11 −0 livekit-ffi/CHANGELOG.md
+8 −9 livekit-ffi/Cargo.toml
+0 −0 livekit-ffi/src/common.rs
+1 −1 livekit-ffi/src/core_modules/data_stream/common.rs
+1 −1 livekit-ffi/src/core_modules/data_stream/incoming.rs
+1 −1 livekit-ffi/src/core_modules/data_stream/mod.rs
+38 −0 livekit-ffi/src/core_modules/data_track_manager/common.rs
+4 −72 livekit-ffi/src/core_modules/data_track_manager/local.rs
+0 −0 livekit-ffi/src/core_modules/data_track_manager/mod.rs
+4 −112 livekit-ffi/src/core_modules/data_track_manager/remote.rs
+6 −8 livekit-ffi/src/core_modules/mod.rs
+0 −24 livekit-ffi/src/data_track/common.rs
+107 −0 livekit-ffi/src/data_track/local.rs
+25 −0 livekit-ffi/src/data_track/mod.rs
+188 −0 livekit-ffi/src/data_track/remote.rs
+16 −3 livekit-ffi/src/lib.rs
+488 −0 livekit-ffi/src/migration_tests.rs
+23 −117 livekit-ffi/src/room_apis/server/data_track.rs
+7 −3 livekit-ffi/src/room_apis/server/participant.rs
+41 −20 livekit-ffi/src/room_apis/server/requests.rs
+14 −3 livekit-ffi/src/room_apis/server/room.rs
+9 −1 livekit-ffi/src/runtime.rs
+1 −0 livekit-ffi/uniffi.toml
+6 −0 livekit/CHANGELOG.md
+1 −1 livekit/Cargo.toml
+394 −12 livekit/src/rtc_engine/peer_transport.rs
+39 −0 livekit/tests/peer_connection_signaling_test.rs
+68 −0 verwalter.toml
42 changes: 19 additions & 23 deletions cmake/uniffi_cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@

set(LIVEKIT_UNIFFI_CPP_GENERATED_DIR "${LIVEKIT_BINARY_DIR}/generated/uniffi")
set(LIVEKIT_UNIFFI_CPP_SOURCE
"${LIVEKIT_UNIFFI_CPP_GENERATED_DIR}/livekit_ffi.cpp")
set(LIVEKIT_UNIFFI_CPP_HEADER
"${LIVEKIT_UNIFFI_CPP_GENERATED_DIR}/livekit_ffi.hpp")
set(LIVEKIT_UNIFFI_CPP_SCAFFOLDING_HEADER
"${LIVEKIT_UNIFFI_CPP_GENERATED_DIR}/livekit_ffi_scaffolding.hpp")
"${LIVEKIT_BINARY_DIR}/generated/uniffi_bindings.cpp")
set(LIVEKIT_UNIFFI_CPP_GLOB_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/uniffi_cpp_glob.cmake")

# Release Linux builds strip the UniFFI metadata symbols, so generate from a
# separate unstripped Debug library there. PE and Mach-O retain the metadata,
Expand Down Expand Up @@ -64,11 +61,14 @@ endif()
# livekit-ffi library exists before it is inspected on Windows and macOS.
add_dependencies(build_livekit_ffi_metadata build_rust_ffi)

# build_rust_ffi runs before build_livekit_ffi_metadata, which supplies the
# library for generate_livekit_ffi_uniffi_cpp. Both C++ targets wait for
# generation. livekit_uniffi_cpp compiles the combined source, and livekit
# links its objects and includes the generated headers.
add_custom_command(
OUTPUT
"${LIVEKIT_UNIFFI_CPP_SOURCE}"
"${LIVEKIT_UNIFFI_CPP_HEADER}"
"${LIVEKIT_UNIFFI_CPP_SCAFFOLDING_HEADER}"
OUTPUT "${LIVEKIT_UNIFFI_CPP_SOURCE}"
COMMAND "${CMAKE_COMMAND}" -E rm -rf
"${LIVEKIT_UNIFFI_CPP_GENERATED_DIR}" "${LIVEKIT_UNIFFI_CPP_SOURCE}"
COMMAND "${CMAKE_COMMAND}" -E make_directory
"${LIVEKIT_UNIFFI_CPP_GENERATED_DIR}"
COMMAND "${CMAKE_COMMAND}" -E env
Expand All @@ -81,31 +81,27 @@ add_custom_command(
--
--library "${LIVEKIT_UNIFFI_METADATA_LIBRARY}"
--out-dir "${LIVEKIT_UNIFFI_CPP_GENERATED_DIR}"
COMMAND "${CMAKE_COMMAND}"
"-DBUILD_DIR=${LIVEKIT_BINARY_DIR}"
"-DBINDINGS_DIR=${LIVEKIT_UNIFFI_CPP_GENERATED_DIR}"
"-DOUTPUT_SOURCE=${LIVEKIT_UNIFFI_CPP_SOURCE}"
-P "${LIVEKIT_UNIFFI_CPP_GLOB_SCRIPT}"
WORKING_DIRECTORY "${RUST_ROOT}"
DEPENDS
build_livekit_ffi_metadata
"${LIVEKIT_UNIFFI_METADATA_LIBRARY}"
${RUST_SOURCES}
${LIVEKIT_UNIFFI_BINDGEN_SOURCES}
"${LIVEKIT_UNIFFI_CPP_GLOB_SCRIPT}"
DEPFILE "${LIVEKIT_UNIFFI_CPP_SOURCE}.d"
COMMENT "Generating UniFFI C++ bindings"
VERBATIM
)
add_custom_target(generate_livekit_ffi_uniffi_cpp
DEPENDS
"${LIVEKIT_UNIFFI_CPP_SOURCE}"
"${LIVEKIT_UNIFFI_CPP_HEADER}"
"${LIVEKIT_UNIFFI_CPP_SCAFFOLDING_HEADER}"
)

set_source_files_properties(
"${LIVEKIT_UNIFFI_CPP_SOURCE}"
"${LIVEKIT_UNIFFI_CPP_HEADER}"
"${LIVEKIT_UNIFFI_CPP_SCAFFOLDING_HEADER}"
PROPERTIES GENERATED TRUE
DEPENDS "${LIVEKIT_UNIFFI_CPP_SOURCE}"
)

add_library(livekit_uniffi_cpp OBJECT
"${LIVEKIT_UNIFFI_CPP_SOURCE}"
)
add_library(livekit_uniffi_cpp OBJECT "${LIVEKIT_UNIFFI_CPP_SOURCE}")
set_target_properties(livekit_uniffi_cpp PROPERTIES
CXX_VISIBILITY_PRESET hidden
C_VISIBILITY_PRESET hidden
Expand Down
33 changes: 33 additions & 0 deletions cmake/uniffi_cpp_glob.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2026 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Bindgen emits component files at build time, after CMake fixes the source
# list. This script collects them into one source with a known path and
# records the generated files as dependencies.
file(GLOB sources RELATIVE "${BUILD_DIR}" "${BINDINGS_DIR}/*.cpp")
file(GLOB headers RELATIVE "${BUILD_DIR}" "${BINDINGS_DIR}/*.hpp")
if(NOT sources OR NOT headers)
message(FATAL_ERROR "Expected UniFFI C++ sources and headers in ${BINDINGS_DIR}")
endif()

set(includes "")
foreach(source IN LISTS sources)
get_filename_component(filename "${source}" NAME)
string(APPEND includes "#include \"${filename}\"\n")
endforeach()

# Track the generated files so deleting any of them reruns bindgen.
file(RELATIVE_PATH output "${BUILD_DIR}" "${OUTPUT_SOURCE}")
string(JOIN " " dependencies ${sources} ${headers})
file(WRITE "${OUTPUT_SOURCE}.d" "${output}: ${dependencies}\n")
file(WRITE "${OUTPUT_SOURCE}" "${includes}")
Loading