Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550)

Similar to #20826 but keeps the Swift implementation. There were quite a
few changes in the `call` crate, and so that code now has two variants.

Closes #13714

Release Notes:

- Added preliminary Linux support for voice chat and viewing
screenshares.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Michael Sloan
2024-12-05 15:06:17 -08:00
committed by GitHub
co-authored by Kirill Bulatov Kirill Bulatov Mikayla
parent 0511768b22
commit 6a4cd53fd8
91 changed files with 7187 additions and 1028 deletions
Generated
+474 -28
View File
@@ -962,6 +962,22 @@ dependencies = [
"syn 2.0.87",
]
[[package]]
name = "async-tungstenite"
version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2cca750b12e02c389c1694d35c16539f88b8bbaa5945934fdc1b41a776688589"
dependencies = [
"async-native-tls",
"async-std",
"async-tls",
"futures-io",
"futures-util",
"log",
"pin-project-lite",
"tungstenite 0.21.0",
]
[[package]]
name = "async-tungstenite"
version = "0.28.0"
@@ -1830,7 +1846,7 @@ dependencies = [
"arrayvec",
"cc",
"cfg-if",
"constant_time_eq",
"constant_time_eq 0.3.1",
]
[[package]]
@@ -2015,6 +2031,27 @@ dependencies = [
"either",
]
[[package]]
name = "bzip2"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
dependencies = [
"bzip2-sys",
"libc",
]
[[package]]
name = "bzip2-sys"
version = "0.1.11+1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
dependencies = [
"cc",
"libc",
"pkg-config",
]
[[package]]
name = "call"
version = "0.1.0"
@@ -2023,12 +2060,14 @@ dependencies = [
"audio",
"client",
"collections",
"feature_flags",
"fs",
"futures 0.3.31",
"gpui",
"http_client",
"language",
"live_kit_client",
"livekit_client",
"livekit_client_macos",
"log",
"postage",
"project",
@@ -2486,7 +2525,7 @@ dependencies = [
"anyhow",
"async-native-tls",
"async-recursion 0.3.2",
"async-tungstenite",
"async-tungstenite 0.28.0",
"chrono",
"clock",
"cocoa 0.26.0",
@@ -2618,7 +2657,7 @@ dependencies = [
"assistant_tool",
"async-stripe",
"async-trait",
"async-tungstenite",
"async-tungstenite 0.28.0",
"audio",
"aws-config",
"aws-sdk-kinesis",
@@ -2656,8 +2695,9 @@ dependencies = [
"jsonwebtoken",
"language",
"language_model",
"live_kit_client",
"live_kit_server",
"livekit_client",
"livekit_client_macos",
"livekit_server",
"log",
"lsp",
"menu",
@@ -2670,7 +2710,7 @@ dependencies = [
"pretty_assertions",
"project",
"prometheus",
"prost",
"prost 0.9.0",
"rand 0.8.5",
"recent_projects",
"release_channel",
@@ -2870,6 +2910,12 @@ dependencies = [
"tiny-keccak",
]
[[package]]
name = "constant_time_eq"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "constant_time_eq"
version = "0.3.1"
@@ -3077,6 +3123,17 @@ dependencies = [
"coreaudio-sys",
]
[[package]]
name = "coreaudio-rs"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34ca07354f6d0640333ef95f48d460a4bcf34812a7e7967f9b44c728a8f37c28"
dependencies = [
"bitflags 1.3.2",
"core-foundation-sys",
"coreaudio-sys",
]
[[package]]
name = "coreaudio-sys"
version = "0.2.16"
@@ -3111,12 +3168,11 @@ dependencies = [
[[package]]
name = "cpal"
version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779"
source = "git+https://github.com/zed-industries/cpal?rev=fd8bc2fd39f1f5fdee5a0690656caff9a26d9d50#fd8bc2fd39f1f5fdee5a0690656caff9a26d9d50"
dependencies = [
"alsa",
"core-foundation-sys",
"coreaudio-rs",
"coreaudio-rs 0.11.3",
"dasp_sample",
"jni",
"js-sys",
@@ -3448,6 +3504,65 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991"
[[package]]
name = "cxx"
version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05e1ec88093d2abd9cf1b09ffd979136b8e922bf31cad966a8fe0d73233112ef"
dependencies = [
"cc",
"cxxbridge-cmd",
"cxxbridge-flags",
"cxxbridge-macro",
"foldhash",
"link-cplusplus",
]
[[package]]
name = "cxx-build"
version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9afa390d956ee7ccb41aeed7ed7856ab3ffb4fc587e7216be7e0f83e949b4e6c"
dependencies = [
"cc",
"codespan-reporting",
"proc-macro2",
"quote",
"scratch",
"syn 2.0.87",
]
[[package]]
name = "cxxbridge-cmd"
version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c23bfff654d6227cbc83de8e059d2f8678ede5fc3a6c5a35d5c379983cc61e6"
dependencies = [
"clap",
"codespan-reporting",
"proc-macro2",
"quote",
"syn 2.0.87",
]
[[package]]
name = "cxxbridge-flags"
version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c01b36e22051bc6928a78583f1621abaaf7621561c2ada1b00f7878fbe2caa"
[[package]]
name = "cxxbridge-macro"
version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6e14013136fac689345d17b9a6df55977251f11d333c0a571e8d963b55e1f95"
dependencies = [
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.87",
]
[[package]]
name = "dashmap"
version = "5.5.3"
@@ -4706,6 +4821,16 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "fs2"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "fsevent"
version = "0.1.0"
@@ -6338,6 +6463,15 @@ dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.12.1"
@@ -6463,7 +6597,7 @@ checksum = "58d9afa5bc6eeafb78f710a2efc585f69099f8b6a99dc7eb826581e3773a6e31"
dependencies = [
"anyhow",
"async-trait",
"async-tungstenite",
"async-tungstenite 0.28.0",
"futures 0.3.31",
"jupyter-protocol",
"serde",
@@ -6881,6 +7015,29 @@ dependencies = [
"vcpkg",
]
[[package]]
name = "libwebrtc"
version = "0.3.7"
source = "git+https://github.com/zed-industries/rust-sdks?rev=799f10133d93ba2a88642cd480d01ec4da53408c#799f10133d93ba2a88642cd480d01ec4da53408c"
dependencies = [
"cxx",
"jni",
"js-sys",
"lazy_static",
"livekit-protocol",
"livekit-runtime",
"log",
"parking_lot",
"serde",
"serde_json",
"thiserror 1.0.69",
"tokio",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"webrtc-sys",
]
[[package]]
name = "libz-sys"
version = "1.1.20"
@@ -6893,6 +7050,15 @@ dependencies = [
"vcpkg",
]
[[package]]
name = "link-cplusplus"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9"
dependencies = [
"cc",
]
[[package]]
name = "linkify"
version = "0.10.0"
@@ -6941,7 +7107,112 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704"
[[package]]
name = "live_kit_client"
name = "livekit"
version = "0.7.0"
source = "git+https://github.com/zed-industries/rust-sdks?rev=799f10133d93ba2a88642cd480d01ec4da53408c#799f10133d93ba2a88642cd480d01ec4da53408c"
dependencies = [
"chrono",
"futures-util",
"lazy_static",
"libwebrtc",
"livekit-api",
"livekit-protocol",
"livekit-runtime",
"log",
"parking_lot",
"prost 0.12.6",
"semver",
"serde",
"serde_json",
"thiserror 1.0.69",
"tokio",
]
[[package]]
name = "livekit-api"
version = "0.4.1"
source = "git+https://github.com/zed-industries/rust-sdks?rev=799f10133d93ba2a88642cd480d01ec4da53408c#799f10133d93ba2a88642cd480d01ec4da53408c"
dependencies = [
"async-tungstenite 0.25.1",
"futures-util",
"http 0.2.12",
"jsonwebtoken",
"livekit-protocol",
"livekit-runtime",
"log",
"parking_lot",
"prost 0.12.6",
"reqwest 0.11.27",
"scopeguard",
"serde",
"serde_json",
"sha2",
"thiserror 1.0.69",
"tokio",
"tokio-tungstenite 0.20.1",
"url",
]
[[package]]
name = "livekit-protocol"
version = "0.3.6"
source = "git+https://github.com/zed-industries/rust-sdks?rev=799f10133d93ba2a88642cd480d01ec4da53408c#799f10133d93ba2a88642cd480d01ec4da53408c"
dependencies = [
"futures-util",
"livekit-runtime",
"parking_lot",
"pbjson",
"pbjson-types",
"prost 0.12.6",
"prost-types 0.12.6",
"serde",
"thiserror 1.0.69",
"tokio",
]
[[package]]
name = "livekit-runtime"
version = "0.3.1"
source = "git+https://github.com/zed-industries/rust-sdks?rev=799f10133d93ba2a88642cd480d01ec4da53408c#799f10133d93ba2a88642cd480d01ec4da53408c"
dependencies = [
"async-io 2.4.0",
"async-std",
"async-task",
"futures 0.3.31",
]
[[package]]
name = "livekit_client"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
"collections",
"core-foundation 0.9.4",
"coreaudio-rs 0.12.1",
"cpal",
"futures 0.3.31",
"gpui",
"http 0.2.12",
"http_client",
"image",
"livekit",
"livekit_server",
"log",
"media",
"nanoid",
"parking_lot",
"postage",
"serde",
"serde_json",
"sha2",
"simplelog",
"smallvec",
"util",
]
[[package]]
name = "livekit_client_macos"
version = "0.1.0"
dependencies = [
"anyhow",
@@ -6951,7 +7222,7 @@ dependencies = [
"core-foundation 0.9.4",
"futures 0.3.31",
"gpui",
"live_kit_server",
"livekit_server",
"log",
"media",
"nanoid",
@@ -6964,16 +7235,16 @@ dependencies = [
]
[[package]]
name = "live_kit_server"
name = "livekit_server"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
"jsonwebtoken",
"log",
"prost",
"prost-build",
"prost-types",
"prost 0.9.0",
"prost-build 0.9.0",
"prost-types 0.9.0",
"reqwest 0.12.8",
"serde",
]
@@ -7262,6 +7533,7 @@ dependencies = [
"anyhow",
"bindgen",
"core-foundation 0.9.4",
"ctor",
"foreign-types 0.5.0",
"metal",
"objc",
@@ -7954,7 +8226,7 @@ dependencies = [
"md-5",
"num",
"num-bigint-dig",
"pbkdf2",
"pbkdf2 0.12.2",
"rand 0.8.5",
"serde",
"sha2",
@@ -8274,6 +8546,17 @@ dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "password-hash"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
dependencies = [
"base64ct",
"rand_core 0.6.4",
"subtle",
]
[[package]]
name = "password-hash"
version = "0.5.0"
@@ -8324,6 +8607,55 @@ dependencies = [
"util",
]
[[package]]
name = "pbjson"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90"
dependencies = [
"base64 0.21.7",
"serde",
]
[[package]]
name = "pbjson-build"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735"
dependencies = [
"heck 0.4.1",
"itertools 0.11.0",
"prost 0.12.6",
"prost-types 0.12.6",
]
[[package]]
name = "pbjson-types"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12"
dependencies = [
"bytes 1.8.0",
"chrono",
"pbjson",
"pbjson-build",
"prost 0.12.6",
"prost-build 0.12.6",
"serde",
]
[[package]]
name = "pbkdf2"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
dependencies = [
"digest",
"hmac",
"password-hash 0.4.2",
"sha2",
]
[[package]]
name = "pbkdf2"
version = "0.12.2"
@@ -9353,7 +9685,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001"
dependencies = [
"bytes 1.8.0",
"prost-derive",
"prost-derive 0.9.0",
]
[[package]]
name = "prost"
version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29"
dependencies = [
"bytes 1.8.0",
"prost-derive 0.12.6",
]
[[package]]
@@ -9369,13 +9711,34 @@ dependencies = [
"log",
"multimap",
"petgraph",
"prost",
"prost-types",
"prost 0.9.0",
"prost-types 0.9.0",
"regex",
"tempfile",
"which 4.4.2",
]
[[package]]
name = "prost-build"
version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4"
dependencies = [
"bytes 1.8.0",
"heck 0.5.0",
"itertools 0.12.1",
"log",
"multimap",
"once_cell",
"petgraph",
"prettyplease",
"prost 0.12.6",
"prost-types 0.12.6",
"regex",
"syn 2.0.87",
"tempfile",
]
[[package]]
name = "prost-derive"
version = "0.9.0"
@@ -9389,6 +9752,19 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "prost-derive"
version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1"
dependencies = [
"anyhow",
"itertools 0.12.1",
"proc-macro2",
"quote",
"syn 2.0.87",
]
[[package]]
name = "prost-types"
version = "0.9.0"
@@ -9396,7 +9772,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a"
dependencies = [
"bytes 1.8.0",
"prost",
"prost 0.9.0",
]
[[package]]
name = "prost-types"
version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0"
dependencies = [
"prost 0.12.6",
]
[[package]]
@@ -9405,8 +9790,8 @@ version = "0.1.0"
dependencies = [
"anyhow",
"collections",
"prost",
"prost-build",
"prost 0.9.0",
"prost-build 0.9.0",
"serde",
]
@@ -9906,7 +10291,7 @@ dependencies = [
"log",
"parking_lot",
"paths",
"prost",
"prost 0.9.0",
"release_channel",
"rpc",
"serde",
@@ -10041,6 +10426,7 @@ dependencies = [
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.31",
"hyper-rustls 0.24.2",
"hyper-tls",
"ipnet",
"js-sys",
@@ -10050,6 +10436,8 @@ dependencies = [
"once_cell",
"percent-encoding",
"pin-project-lite",
"rustls 0.21.12",
"rustls-native-certs 0.6.3",
"rustls-pemfile 1.0.4",
"serde",
"serde_json",
@@ -10058,6 +10446,7 @@ dependencies = [
"system-configuration 0.5.1",
"tokio",
"tokio-native-tls",
"tokio-rustls 0.24.1",
"tower-service",
"url",
"wasm-bindgen",
@@ -10281,7 +10670,7 @@ name = "rpc"
version = "0.1.0"
dependencies = [
"anyhow",
"async-tungstenite",
"async-tungstenite 0.28.0",
"base64 0.22.1",
"chrono",
"collections",
@@ -10657,14 +11046,20 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "scratch"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152"
[[package]]
name = "scrypt"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f"
dependencies = [
"password-hash",
"pbkdf2",
"password-hash 0.5.0",
"pbkdf2 0.12.2",
"salsa20",
"sha2",
]
@@ -12823,7 +13218,10 @@ checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c"
dependencies = [
"futures-util",
"log",
"rustls 0.21.12",
"rustls-native-certs 0.6.3",
"tokio",
"tokio-rustls 0.24.1",
"tungstenite 0.20.1",
]
@@ -13331,6 +13729,7 @@ dependencies = [
"httparse",
"log",
"rand 0.8.5",
"rustls 0.21.12",
"sha1",
"thiserror 1.0.69",
"url",
@@ -13349,6 +13748,7 @@ dependencies = [
"http 1.1.0",
"httparse",
"log",
"native-tls",
"rand 0.8.5",
"sha1",
"thiserror 1.0.69",
@@ -14461,6 +14861,32 @@ dependencies = [
"rustls-pki-types",
]
[[package]]
name = "webrtc-sys"
version = "0.3.5"
source = "git+https://github.com/zed-industries/rust-sdks?rev=799f10133d93ba2a88642cd480d01ec4da53408c#799f10133d93ba2a88642cd480d01ec4da53408c"
dependencies = [
"cc",
"cxx",
"cxx-build",
"glob",
"log",
"webrtc-sys-build",
]
[[package]]
name = "webrtc-sys-build"
version = "0.3.5"
source = "git+https://github.com/zed-industries/rust-sdks?rev=799f10133d93ba2a88642cd480d01ec4da53408c#799f10133d93ba2a88642cd480d01ec4da53408c"
dependencies = [
"fs2",
"regex",
"reqwest 0.11.27",
"scratch",
"semver",
"zip",
]
[[package]]
name = "weezl"
version = "0.1.8"
@@ -16026,6 +16452,26 @@ dependencies = [
"syn 2.0.87",
]
[[package]]
name = "zip"
version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
dependencies = [
"aes",
"byteorder",
"bzip2",
"constant_time_eq 0.1.5",
"crc32fast",
"crossbeam-utils",
"flate2",
"hmac",
"pbkdf2 0.11.0",
"sha1",
"time",
"zstd",
]
[[package]]
name = "zstd"
version = "0.11.2+zstd.1.5.2"