Skip to content

Commit f0aa75e

Browse files
committed
fix local ffi path
1 parent a7694b7 commit f0aa75e

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

β€Žmakefileβ€Ž

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,22 @@ link-rtc-local: ## Build and link local rust SDK from source
152152
cd $(RUST_SUBMODULE) && cargo build --release -p livekit-ffi; \
153153
echo "$(CYAN)πŸ“ Generating protobuf FFI protocol...$(RESET)"; \
154154
cd $(PYTHON_RTC) && ./generate_proto.sh; \
155-
RUST_LIB_PATH="$$(cd $(RUST_SUBMODULE) && pwd)/target/release"; \
155+
RUST_LIB_DIR="$$(cd $(RUST_SUBMODULE) && pwd)/target/release"; \
156+
if [ "$(OS)" = "darwin" ]; then \
157+
RUST_LIB_PATH="$$RUST_LIB_DIR/liblivekit_ffi.dylib"; \
158+
elif [ "$(OS)" = "linux" ]; then \
159+
RUST_LIB_PATH="$$RUST_LIB_DIR/liblivekit_ffi.so"; \
160+
else \
161+
RUST_LIB_PATH="$$RUST_LIB_DIR/livekit_ffi.dll"; \
162+
fi; \
156163
echo "$(CYAN) LIVEKIT_LIB_PATH=$$RUST_LIB_PATH$(RESET)"; \
157164
echo "$(CYAN)πŸ”— Adding local python-rtc to agents...$(RESET)"; \
158165
cd $(AGENTS_PROJECT) && uv add --editable "../../python-sdks/livekit-rtc" && uv sync; \
159166
echo "LIVEKIT_LIB_PATH=$$RUST_LIB_PATH" > $(AGENTS_PROJECT)/.env; \
160-
echo "$(BOLD)$(GREEN)βœ… Linked to local rust-sdk + python-rtc$(RESET)"
167+
echo "$(BOLD)$(GREEN)βœ… Linked to local rust-sdk + python-rtc$(RESET)"; \
168+
echo ""; \
169+
echo "$(BOLD)$(YELLOW)πŸ“‹ To use the local rust lib in your terminal, run:$(RESET)"; \
170+
echo "$(BOLD) export LIVEKIT_LIB_PATH=$$RUST_LIB_PATH$(RESET)"
161171

162172
link-rtc-version: ## Install specific livekit version from PyPI (e.g., make link-rtc-version VERSION=0.18.0)
163173
ifndef VERSION

0 commit comments

Comments
Β (0)