Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Bundle linux deps (#11681)
Conrad Irwin9af1298a7f6a
diff --git a/Cargo.lock b/Cargo.lockindex 0693322d5f9..af7285a4aaf 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -621,6 +621,18 @@ dependencies = ["url",]+[[package]]+name = "async-native-tls"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9343dc5acf07e79ff82d0c37899f079db3534d99f189a1837c8e549c99405bec"+dependencies = [+ "futures-util",+ "native-tls",+ "thiserror",+ "url",+]+[[package]]name = "async-net"version = "1.7.0"@@ -815,7 +827,7 @@ version = "0.16.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5682ea0913e5c20780fe5785abacb85a411e7437bf52a1bedb93ddb3972cb8dd"dependencies = [- "async-native-tls",+ "async-native-tls 0.3.3","async-std","futures-io","futures-util",@@ -2185,6 +2197,7 @@ name = "client"version = "0.1.0"dependencies = ["anyhow",+ "async-native-tls 0.5.0","async-recursion 0.3.2","async-tungstenite","chrono",@@ -6899,6 +6912,15 @@ version = "0.1.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"+[[package]]+name = "openssl-src"+version = "300.2.3+3.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843"+dependencies = [+ "cc",+]+[[package]]name = "openssl-sys"version = "0.9.93"@@ -6907,6 +6929,7 @@ checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d"dependencies = ["cc","libc",+ "openssl-src","pkg-config","vcpkg",]diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.tomlindex a99fcefd38e..b502c2d1ee2 100644--- a/crates/client/Cargo.toml+++ b/crates/client/Cargo.toml@@ -19,6 +19,7 @@ test-support = ["clock/test-support", "collections/test-support", "gpui/test-supanyhow.workspace = trueasync-recursion = "0.3"async-tungstenite = { version = "0.16", features = ["async-std", "async-native-tls"] }+async-native-tls = { version = "0.5.0", features = ["vendored"] }chrono = { workspace = true, features = ["serde"] }clock.workspace = truecollections.workspace = true@@ -58,3 +59,10 @@ rpc = { workspace = true, features = ["test-support"] }settings = { workspace = true, features = ["test-support"] }util = { workspace = true, features = ["test-support"] }http = { workspace = true, features = ["test-support"] }++[target.'cfg(target_os = "linux")'.dependencies]+async-native-tls = {"version" = "0.5.0", features = ["vendored"]}+# This is an indirect dependency of async-tungstenite that is included+# here so we can vendor libssl with the feature flag.+[package.metadata.cargo-machete]+ignored = ["async-native-tls"]diff --git a/script/bundle-linux b/script/bundle-linuxindex 902167606f0..a8d5df86d3c 100755--- a/script/bundle-linux+++ b/script/bundle-linux@@ -27,7 +27,7 @@ export ZED_BUNDLE=truechannel=$(<crates/zed/RELEASE_CHANNEL)-version="$(cargo metadata --no-deps --manifest-path crates/zed/Cargo.toml --offline --format-version=1 | jq -r '.packages | map(select(.name == "zed"))[0].version')"+version="$(script/get-crate-version zed)"# Set RELEASE_VERSION so it's compiled into GPUI and it knows about the version.export RELEASE_VERSION="${version}"@@ -38,6 +38,7 @@ host_line=$(echo "$version_info" | grep host)target_triple=${host_line#*: }# Build binary in release mode+export RUSTFLAGS="-C link-args=-Wl,-rpath,\$ORIGIN/../lib"cargo build --release --target "${target_triple}" --package zed --package cli# Strip the binary of all debug symbols@@ -60,6 +61,17 @@ mkdir -p "${zed_dir}/bin"cp "target/${target_triple}/release/Zed" "${zed_dir}/bin/zed"cp "target/${target_triple}/release/cli" "${zed_dir}/bin/cli"+# Libs+find_libs() {+ ldd target/debug/Zed |\+ cut -d' ' -f3 |\+ grep -v '\<\(libstdc++.so\|libc.so\|libgcc_s.so\|libm.so\)'+}++mkdir -p "${zed_dir}/lib"+rm -rf "${zed_dir}/lib/*"+cp $(find_libs) "${zed_dir}/lib"+# Iconsmkdir -p "${zed_dir}/share/icons/hicolor/512x512/apps"cp "crates/zed/resources/app-icon$suffix.png" "${zed_dir}/share/icons/hicolor/512x512/apps/zed.png"