diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index a5fa38a55..4f1c59241 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -56,7 +56,7 @@ jobs: target: ${{ matrix.target }} - name: Build release binary shell: bash - run: cargo build --target ${{ matrix.target }} --verbose --release --features packaging,vendored-openssl + run: cargo build --target ${{ matrix.target }} --verbose --release --features vendored-openssl - name: Set up artifact directory shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2816f9f0f..74fb9d476 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,7 @@ jobs: target: ${{ matrix.target }} - name: Build release binary shell: bash - run: cargo build --target ${{ matrix.target }} --verbose --release --features packaging,vendored-openssl + run: cargo build --target ${{ matrix.target }} --verbose --release --features vendored-openssl - name: Build archive shell: bash run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index bd5f0ddee..736c187ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,13 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Fixed bugs +### Packaging changes + +* Jujutsu now uses + [`zlib-rs`](https://github.com/trifectatechfoundation/zlib-rs), a + fast compression library written in Rust. Packagers should remove any + dependency on CMake and drop the `packaging` Cargo feature. + ## [0.28.2] - 2025-04-07 ### Fixed bugs diff --git a/Cargo.lock b/Cargo.lock index b7fec3896..8af386770 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -465,15 +465,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbd0f76e066e64fdc5631e3bb46381254deab9ef1158292f27c8c57e3bf3fe59" -[[package]] -name = "cmake" -version = "0.1.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" -dependencies = [ - "cc", -] - [[package]] name = "colorchoice" version = "1.0.3" @@ -898,7 +889,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", - "libz-ng-sys", + "libz-rs-sys", "miniz_oxide", ] @@ -2495,13 +2486,12 @@ dependencies = [ ] [[package]] -name = "libz-ng-sys" -version = "1.1.22" +name = "libz-rs-sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7118c2c2a3c7b6edc279a8b19507672b9c4d716f95e671172dfa4e23f9fd824" +checksum = "6489ca9bd760fe9642d7644e827b0c9add07df89857b0416ee15c1cc1a3b8c5a" dependencies = [ - "cmake", - "libc", + "zlib-rs", ] [[package]] @@ -4941,3 +4931,9 @@ dependencies = [ "quote", "syn 2.0.100", ] + +[[package]] +name = "zlib-rs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "868b928d7949e09af2f6086dfc1e01936064cc7a819253bce650d4e2a2d63ba8" diff --git a/Cargo.toml b/Cargo.toml index 4ee818de9..15ed36670 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,6 +59,7 @@ gix = { version = "0.71.0", default-features = false, features = [ "blob-diff", "index", "max-performance-safe", + "zlib-rs", ] } glob = "0.3.2" hashbrown = { version = "0.15.2", default-features = false, features = ["inline-more"] } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index bf1daadeb..f26e79f8f 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -113,8 +113,6 @@ default = ["watchman", "git", "git2"] bench = ["dep:criterion"] git = ["jj-lib/git", "dep:gix"] git2 = ["git", "jj-lib/git2", "dep:git2"] -gix-max-performance = ["jj-lib/gix-max-performance"] -packaging = ["gix-max-performance"] test-fakes = ["jj-lib/testing"] vendored-openssl = ["git2/vendored-openssl", "jj-lib/vendored-openssl"] watchman = ["jj-lib/watchman"] diff --git a/deny.toml b/deny.toml index ab54af681..c9e5b9b35 100644 --- a/deny.toml +++ b/deny.toml @@ -93,7 +93,6 @@ allow = [ "Apache-2.0 WITH LLVM-exception", "Apache-2.0", "BSD-3-Clause", - "ISC", "MIT", "MPL-2.0", "Unicode-3.0", diff --git a/flake.nix b/flake.nix index 69aaa7b24..f132d04da 100644 --- a/flake.nix +++ b/flake.nix @@ -64,10 +64,6 @@ [ gzip pkg-config - - # for libz-ng-sys (zlib-ng) - # TODO: switch to the packaged zlib-ng and drop this dependency - cmake ] ++ lib.optionals stdenv.isLinux [ mold-wrapped @@ -109,7 +105,6 @@ pname = "jujutsu"; version = "unstable-${self.shortRev or "dirty"}"; - buildFeatures = ["packaging"]; cargoBuildFlags = ["--bin" "jj"]; # don't build and install the fake editors useNextest = true; cargoTestFlags = ["--profile" "ci"]; diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 0f6c0a3af..f1b3d4948 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -97,12 +97,6 @@ tokio = { workspace = true, features = ["full"] } default = ["git", "git2"] git = ["dep:gix"] git2 = ["git", "dep:git2"] -gix-max-performance = [ - # Requires `cmake` as a build dependency. - # Note that this feature is different from `gix/max-performance-safe`. - # See: https://docs.rs/gix/latest/gix/#performance - "gix/max-performance", -] vendored-openssl = ["git2/vendored-openssl"] watchman = ["dep:tokio", "dep:watchman_client"] testing = ["git"]