diff --git a/Cargo.lock b/Cargo.lock index cc7cadabbb..651ca95a2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1001,14 +1001,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-tls" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ae3c9eba89d472a0e4fe1dea433df78fbbe63d2b764addaf2ba3a6bde89a5e" +source = "git+https://github.com/zed-industries/async-tls?rev=1e759a4b5e370f87dc15e40756ac4f8815b61d9d#1e759a4b5e370f87dc15e40756ac4f8815b61d9d" dependencies = [ "futures-core", "futures-io", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", - "webpki-roots 0.22.6", + "rustls 0.23.22", + "rustls-pemfile 2.2.0", + "webpki-roots", ] [[package]] @@ -1222,6 +1221,31 @@ dependencies = [ "zeroize", ] +[[package]] +name = "aws-lc-rs" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c2b7ddaa2c56a367ad27a094ad8ef4faacf8a617c2575acb2ba88949df999ca" +dependencies = [ + "aws-lc-sys", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71b2ddd3ada61a305e1d8bb6c005d1eaa7d14d903681edfc400406d523a9b491" +dependencies = [ + "bindgen 0.69.5", + "cc", + "cmake", + "dunce", + "fs_extra", + "paste", +] + [[package]] name = "aws-runtime" version = "1.5.4" @@ -1729,6 +1753,29 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.8.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.90", + "which 4.4.2", +] + [[package]] name = "bindgen" version = "0.70.1" @@ -2560,7 +2607,7 @@ dependencies = [ "rand 0.8.5", "release_channel", "rpc", - "rustls 0.21.12", + "rustls 0.23.22", "rustls-native-certs 0.8.1", "schemars", "serde", @@ -2590,6 +2637,15 @@ dependencies = [ "smallvec", ] +[[package]] +name = "cmake" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e24a03c8b52922d68a1589ad61032f2c1aa5a8158d2aa0d93c6e9534944bbad6" +dependencies = [ + "cc", +] + [[package]] name = "cobs" version = "0.2.3" @@ -3162,7 +3218,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ce857aa0b77d77287acc1ac3e37a05a8c95a2af3647d23b15f263bdaeb7562b" dependencies = [ - "bindgen", + "bindgen 0.70.1", ] [[package]] @@ -4873,6 +4929,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fsevent" version = "0.1.0" @@ -5381,7 +5443,7 @@ dependencies = [ "ashpd", "async-task", "backtrace", - "bindgen", + "bindgen 0.70.1", "blade-graphics", "blade-macros", "blade-util", @@ -6005,7 +6067,7 @@ dependencies = [ "http 1.2.0", "hyper 1.5.1", "hyper-util", - "rustls 0.23.20", + "rustls 0.23.22", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", @@ -7028,6 +7090,12 @@ dependencies = [ "spin", ] +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "leb128" version = "0.2.5" @@ -7084,7 +7152,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -7609,7 +7677,7 @@ name = "media" version = "0.1.0" dependencies = [ "anyhow", - "bindgen", + "bindgen 0.70.1", "core-foundation 0.9.4", "ctor", "foreign-types 0.5.0", @@ -10254,7 +10322,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.0", - "rustls 0.23.20", + "rustls 0.23.22", "socket2", "thiserror 2.0.6", "tokio", @@ -10272,7 +10340,7 @@ dependencies = [ "rand 0.8.5", "ring", "rustc-hash 2.1.0", - "rustls 0.23.20", + "rustls 0.23.22", "rustls-pki-types", "slab", "thiserror 2.0.6", @@ -10834,7 +10902,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.20", + "rustls 0.23.22", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -11208,10 +11276,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" dependencies = [ + "aws-lc-rs", + "log", "once_cell", "ring", "rustls-pki-types", @@ -11287,6 +11357,7 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -12285,7 +12356,7 @@ dependencies = [ "once_cell", "percent-encoding", "rust_decimal", - "rustls 0.23.20", + "rustls 0.23.22", "rustls-pemfile 2.2.0", "serde", "serde_json", @@ -12298,7 +12369,7 @@ dependencies = [ "tracing", "url", "uuid", - "webpki-roots 0.26.7", + "webpki-roots", ] [[package]] @@ -13530,7 +13601,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.20", + "rustls 0.23.22", "tokio", ] @@ -15178,25 +15249,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] - [[package]] name = "webpki-roots" version = "0.26.7" diff --git a/Cargo.toml b/Cargo.toml index 17e865c054..9f77103e62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -474,7 +474,7 @@ runtimelib = { version = "0.25.0", default-features = false, features = [ rustc-demangle = "0.1.23" rust-embed = { version = "8.4", features = ["include-exclude"] } rustc-hash = "2.1.0" -rustls = "0.21.12" +rustls = { version = "0.23.22" } rustls-native-certs = "0.8.0" schemars = { version = "0.8", features = ["impl_json_schema", "indexmap2"] } semver = "1.0" @@ -618,6 +618,7 @@ features = [ # TODO livekit https://github.com/RustAudio/cpal/pull/891 [patch.crates-io] cpal = { git = "https://github.com/zed-industries/cpal", rev = "fd8bc2fd39f1f5fdee5a0690656caff9a26d9d50" } +real-async-tls = { git = "https://github.com/zed-industries/async-tls", rev = "1e759a4b5e370f87dc15e40756ac4f8815b61d9d", package = "async-tls"} [profile.dev] split-debuginfo = "unpacked" diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index e6b86a4e52..f6cb04c866 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -146,6 +146,8 @@ pub fn init_settings(cx: &mut App) { } pub fn init(client: &Arc, cx: &mut App) { + let _ = rustls::crypto::aws_lc_rs::default_provider().install_default(); + let client = Arc::downgrade(client); cx.on_action({ let client = client.clone(); @@ -1131,15 +1133,8 @@ impl Client { for error in root_certs.errors { log::warn!("error loading native certs: {:?}", error); } - root_store.add_parsable_certificates( - &root_certs - .certs - .into_iter() - .map(|cert| cert.as_ref().to_owned()) - .collect::>(), - ); + root_store.add_parsable_certificates(root_certs.certs); rustls::ClientConfig::builder() - .with_safe_defaults() .with_root_certificates(root_store) .with_no_client_auth() }; diff --git a/script/bundle-linux b/script/bundle-linux index 4d32988608..e40eb33c93 100755 --- a/script/bundle-linux +++ b/script/bundle-linux @@ -52,6 +52,8 @@ if "$rustup_installed"; then rustup target add "$remote_server_triple" fi +export CC=$(which clang) + # Build binary in release mode export RUSTFLAGS="${RUSTFLAGS:-} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib" cargo build --release --target "${target_triple}" --package zed --package cli diff --git a/script/linux b/script/linux index d599d9cce7..943c9d61b4 100755 --- a/script/linux +++ b/script/linux @@ -45,6 +45,7 @@ if [[ -n $apt ]]; then libsqlite3-dev musl-tools musl-dev + build-essential ) if (grep -qP 'PRETTY_NAME="(Linux Mint 22|.+24\.(04|10))' /etc/os-release); then deps+=( mold libstdc++-14-dev )