Skip to content

Commit

Permalink
Revert "Revert "Upgrade to rustls v0.23.22" (#24197)" (#24210)
Browse files Browse the repository at this point in the history
try to reland rustls without breaking linux arm builders

See: 
- #24197
- #24138

Release Notes:

- N/A
  • Loading branch information
ConradIrwin authored Feb 5, 2025
1 parent e506efa commit 9114ca9
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 47 deletions.
128 changes: 90 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
11 changes: 3 additions & 8 deletions crates/client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ pub fn init_settings(cx: &mut App) {
}

pub fn init(client: &Arc<Client>, 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();
Expand Down Expand Up @@ -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::<Vec<_>>(),
);
root_store.add_parsable_certificates(root_certs.certs);
rustls::ClientConfig::builder()
.with_safe_defaults()
.with_root_certificates(root_store)
.with_no_client_auth()
};
Expand Down
2 changes: 2 additions & 0 deletions script/bundle-linux
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions script/linux
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 9114ca9

Please sign in to comment.