From 755b4359b24f2700efb5370eb9b270e5e89905c8 Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Sat, 30 Nov 2024 00:01:40 -0700 Subject: [PATCH] Add libwebrtc/README.md explaining how to build and use it (#499) --- webrtc-sys/libwebrtc/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 webrtc-sys/libwebrtc/README.md diff --git a/webrtc-sys/libwebrtc/README.md b/webrtc-sys/libwebrtc/README.md new file mode 100644 index 000000000..222db6317 --- /dev/null +++ b/webrtc-sys/libwebrtc/README.md @@ -0,0 +1,28 @@ +This directory can contain a checkout of WebRTC. The build scripts +here will install dependencies, checkout the version that LiveKit +currently uses, apply some patches to it, and build it. For example to +do a Linux debug build on x64: + +```sh +$ ./build-linux.sh --arch x64 --profile release +``` + +After running this, `linux-x64-debug/lib/libwebrtc.a` should +exist. This can be rerun to rebuild it, but will complain about +patches not applying as they have already been applied. + +If something goes wrong it may be helpful to consult the [WebRTC native +development documentation](https://webrtc.googlesource.com/src/+/main/docs/native-code/development/). + +# Building LiveKit Rust SDK with custom WebRTC checkout + +Add the following environment variable to `/.config/config.toml`, to +specify use of a custom WebRTC build: + +```toml +[env] +LK_CUSTOM_WEBRTC = { value = "webrtc-sys/libwebrtc/linux-x64-release", relative = true } +``` + +Note that `linux-x64-debug` should be replaced with the artifact +directory appropriate for your configuration.