This directory can contain a checkout of WebRTC from https://github.com/webrtc-sdk/webrtc. The build scripts here will install dependencies, checkout the version that LiveKit currently uses, apply some patches to it, and build it. The currently used version is pinned in .gclient. For example, the build command to do a Linux debug build on x64 is:
$ ./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. Patches that are already applied are skipped, but a patch that neither applies nor is already applied stops the build, so a stale patch cannot produce a library that silently lacks it.
If something goes wrong it may be helpful to consult the WebRTC native development documentation.
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:
[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.
Source
| 1 | This directory can contain a checkout of WebRTC from https://github.com/webrtc-sdk/webrtc. |
| 2 | The build scripts here will install dependencies, checkout the version that LiveKit |
| 3 | currently uses, apply some patches to it, and build it. The currently used version is pinned in |
| 4 | `.gclient`. For example, the build command to do a Linux debug build on x64 is: |
| 5 | |
| 6 | ```sh |
| 7 | $ ./build-linux.sh --arch x64 --profile release |
| 8 | ``` |
| 9 | |
| 10 | After running this, `linux-x64-debug/lib/libwebrtc.a` should |
| 11 | exist. This can be rerun to rebuild it. Patches that are already applied |
| 12 | are skipped, but a patch that neither applies nor is already applied stops |
| 13 | the build, so a stale patch cannot produce a library that silently lacks it. |
| 14 | |
| 15 | If something goes wrong it may be helpful to consult the [WebRTC native |
| 16 | development documentation](https://webrtc.googlesource.com/src/+/main/docs/native-code/development/). |
| 17 | |
| 18 | # Building LiveKit Rust SDK with custom WebRTC checkout |
| 19 | |
| 20 | Add the following environment variable to `/.config/config.toml`, to |
| 21 | specify use of a custom WebRTC build: |
| 22 | |
| 23 | ```toml |
| 24 | [env] |
| 25 | LK_CUSTOM_WEBRTC = { value = "webrtc-sys/libwebrtc/linux-x64-release", relative = true } |
| 26 | ``` |
| 27 | |
| 28 | Note that `linux-x64-debug` should be replaced with the artifact |
| 29 | directory appropriate for your configuration. |