From fd86eafebd870bc2261fe0017e9f8f9d93e21bd3 Mon Sep 17 00:00:00 2001 From: Yuyi-Oak <1722157266@qq.com> Date: Thu, 16 Jul 2026 09:12:40 -0700 Subject: [PATCH] =?UTF-8?q?chore(deps):=20=E7=A7=BB=E9=99=A4=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D=20crate=20=E4=B8=AD=E9=9B=B6=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bat-patch 的 bsdiff/json-patch、bat-assetbundle 的 byteorder/lz4/lzma-rs 在 源码中完全未使用,占位阶段白增编译负担。移除并留注释说明待对应引擎/解析器真正 实现时再按需引入。 对应 issue #18 维护清单 3-6。 Co-Authored-By: Claude Fable 5 --- Cargo.lock | 33 ------------------------------- crates/bat-assetbundle/Cargo.toml | 7 ++----- crates/bat-patch/Cargo.toml | 7 ++----- 3 files changed, 4 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5759441..b187416 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,10 +86,7 @@ name = "bat-assetbundle" version = "0.1.0" dependencies = [ "anyhow", - "byteorder", "hex", - "lz4", - "lzma-rs", "serde", "serde_json", "thiserror", @@ -164,8 +161,6 @@ version = "0.1.0" dependencies = [ "anyhow", "blake3", - "bsdiff", - "json-patch", "serde", "serde_json", "tempfile", @@ -204,12 +199,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bsdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6709158fe6ca66c1f32eb27b4ae5997c67b0df350ae185831233af3e7a91213" - [[package]] name = "byteorder" version = "1.5.0" @@ -729,28 +718,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" -[[package]] -name = "json-patch" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7421438de105a0827e44fadd05377727847d717c80ce29a229f85fd04c427b72" -dependencies = [ - "jsonptr", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "jsonptr" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a3cc660ba5d72bce0b3bb295bf20847ccbb40fd423f3f05b61273672e561fe" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "lazy_static" version = "1.5.0" diff --git a/crates/bat-assetbundle/Cargo.toml b/crates/bat-assetbundle/Cargo.toml index 24fa6cb..7525d87 100644 --- a/crates/bat-assetbundle/Cargo.toml +++ b/crates/bat-assetbundle/Cargo.toml @@ -12,11 +12,8 @@ serde.workspace = true serde_json.workspace = true tracing.workspace = true -# Unity AssetBundle 解析需要的依赖 -byteorder = "1.5" -lz4 = "1.28" -# LZMA 解压缩 -lzma-rs = "0.3" +# 注意:byteorder、lz4、lzma-rs 等 UnityFS 解析/解压依赖待解析器真正实现时 +# 再按需引入,避免占位阶段白增编译负担。 [dev-dependencies] hex = "0.4" diff --git a/crates/bat-patch/Cargo.toml b/crates/bat-patch/Cargo.toml index c41f315..bbffba1 100644 --- a/crates/bat-patch/Cargo.toml +++ b/crates/bat-patch/Cargo.toml @@ -12,11 +12,8 @@ serde.workspace = true serde_json.workspace = true blake3.workspace = true -# Binary diff/patch -bsdiff = "0.2" - -# JSON patch -json-patch = "4.2" +# 注意:bsdiff(binary diff/patch)与 json-patch(RFC 6902)等具体算法依赖 +# 待 Patch 引擎真正实现时再按需引入,避免占位阶段白增编译负担。 [dev-dependencies] tempfile = "3.14"