Files
msg-tool/Cargo.toml
2026-04-11 09:15:22 +08:00

145 lines
6.3 KiB
TOML

[package]
name = "msg_tool"
version = "0.3.1"
edition = "2024"
repository = "https://github.com/lifegpc/msg-tool"
description = "A command-line tool for exporting, importing, packing, and unpacking script files."
license = "GPL-3.0-or-later"
exclude = [".github", "*.py", "AGENTS.md"]
[dependencies]
adler = { version = "1", optional = true }
aes = { version = "0.9", optional = true }
anyhow = "1"
base64 = { version = "0.22", optional = true }
block_compression = { version = "0.9", optional = true, default-features = false, features = ["bc7"] }
byteorder = { version = "1.5", default-features = false, optional = true}
bytes = { version = "1.11", optional = true }
cbc = { version = "0.2", optional = true }
clap = { version = "4.5", features = ["derive"] }
crc32fast = { version = "1.5", optional = true }
csv = "1.3"
ctrlc = "3.4"
digest-io = { version = "0.1", optional = true }
emote-psb = { version = "0.5", optional = true , features = ["serde"] }
encoding = "0.2"
fancy-regex = { version = "0.17", optional = true }
fastcdc = { version = "3.2", optional = true }
flate2 = { version = "1.1", optional = true }
include-flate = { version = "0.3", optional = true }
int-enum = { version = "1.2", optional = true }
jieba-rs = { version = "0.8", optional = true }
json = { version = "0.12", optional = true }
jpegxl-sys = { package = "msg-tool-jpegxl-sys", version = "0.11", optional = true, features = ["vendored"] }
lazy_static = "1.5.0"
libflac-sys = { version = "0.3", optional = true }
libtlg-rs = { version = "0.2", optional = true, features = ["encode"] }
lz4 = { version = "1.28", optional = true }
markup5ever = { version = "0.38", optional = true }
markup5ever_rcdom = { version = "0.38", optional = true }
md5 = { version = "0.8", optional = true }
memchr = { version = "2.7", optional = true }
mozjpeg = { version = "0.10", optional = true }
msg_tool_macro = { path = "./msg_tool_macro" }
msg_tool_xp3data = { path = "./msg_tool_xp3data", optional = true }
num_cpus = "1.17"
overf = "0.1"
parse-size = { version = "1.1", optional = true }
pelite = { version = "0.10", optional = true }
png = { version = "0.18", optional = true }
rand = { version = "0.10", optional = true }
rust-ini = { version = "0.21", optional = true }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml_ng = "0.10"
sha1 = { version = "0.11", optional = true }
sha2 = { version = "0.11", optional = true }
stylua = { version = "2.1", optional = true, default-features = false}
unicode-segmentation = "1.12"
url = { version = "2.5", optional = true }
utf16string = "0.2"
webp = { version = "0.3", default-features = false, optional = true }
xml5ever = { version = "0.38", optional = true }
zopfli = { version = "0.8", optional = true }
zstd = { version = "0.13", optional = true }
[features]
default = ["all-fmt", "image-jpg", "image-jxl", "image-webp", "audio-flac", "jieba"]
# Zig can not build libjxl
zig = ["all-fmt", "image-jpg", "image-webp", "audio-flac", "jieba"]
all-fmt = ["all-script", "all-img", "all-arc", "all-audio"]
all-script = ["artemis", "artemis-panmimisoft", "bgi", "cat-system", "circus", "entis-gls", "escude", "ex-hibit", "favorite", "hexen-haus", "kirikiri", "musica", "qlie", "silky", "softpal", "will-plus", "yaneurao", "yaneurao-itufuru"]
all-img = ["bgi-img", "cat-system-img", "circus-img", "emote-img", "hexen-haus-img", "kirikiri-img", "qlie-img", "softpal-img", "will-plus-img"]
all-arc = ["artemis-arc", "bgi-arc", "cat-system-arc", "circus-arc", "escude-arc", "ex-hibit-arc", "hexen-haus-arc", "kirikiri-arc", "musica-arc", "qlie-arc", "softpal-arc"]
all-audio = ["bgi-audio", "circus-audio"]
artemis = ["stylua", "utils-escape"]
artemis-panmimisoft = ["artemis", "rust-ini"]
artemis-arc = ["artemis", "digest-io", "msg_tool_macro/artemis-arc", "sha1"]
bgi = ["fancy-regex"]
bgi-arc = ["bgi", "rand", "utils-bit-stream"]
bgi-audio = ["bgi"]
bgi-img = ["bgi", "image", "rand", "utils-bit-stream"]
cat-system = ["fancy-regex", "flate2", "int-enum"]
cat-system-arc = ["cat-system", "pelite", "utils-blowfish", "utils-crc32"]
cat-system-img = ["cat-system", "flate2", "image", "mozjpeg", "utils-bit-stream"]
circus = []
circus-arc = ["circus"]
circus-audio = ["circus", "flate2", "int-enum", "lossless-audio"]
circus-img = ["circus", "image", "flate2", "zstd"]
emote-img = ["base64", "block_compression", "emote-psb", "image", "json", "libtlg-rs", "url", "utils-psd"]
entis-gls = ["xml5ever", "markup5ever", "markup5ever_rcdom", "int-enum"]
escude = ["int-enum"]
escude-arc = ["escude", "rand", "utils-bit-stream"]
ex-hibit = []
ex-hibit-arc = ["ex-hibit"]
favorite = ["utils-str"]
hexen-haus = ["memchr", "utils-str"]
hexen-haus-arc = ["hexen-haus"]
hexen-haus-img = ["hexen-haus", "image"]
kirikiri = ["emote-psb", "fancy-regex", "flate2", "json", "lz4", "utils-escape"]
kirikiri-arc = ["kirikiri", "adler", "aes", "bytes", "cbc", "fastcdc", "flate2", "int-enum", "md5", "msg_tool_xp3data", "parse-size", "sha2", "utils-case-insensitive-string", "utils-serde-base64bytes", "utils-simple-pack", "zopfli", "zstd"]
kirikiri-img = ["kirikiri", "image", "libtlg-rs"]
musica = []
musica-arc = ["musica", "crc32fast", "flate2", "include-flate", "utils-blowfish", "utils-rc4", "utils-serde-base64bytes", "utils-xored-stream"]
qlie = []
qlie-arc = ["qlie", "utils-mmx", "pelite", "rand"]
qlie-img = ["qlie", "image", "utils-psd"]
silky = []
softpal = ["int-enum"]
softpal-arc = ["softpal"]
softpal-img = ["softpal", "image"]
will-plus = ["utils-str"]
will-plus-img = ["will-plus", "image"]
yaneurao = []
yaneurao-itufuru = ["yaneurao", "utils-xored-stream"]
# basic feature
image = ["png"]
image-jpg = ["mozjpeg"]
image-jxl = ["image", "jpegxl-sys"]
image-webp = ["webp"]
lossless-audio = ["utils-pcm"]
audio-flac = ["libflac-sys", "utils-pcm"]
unstable = ["msg_tool_macro/unstable", "msg_tool_xp3data?/unstable"]
jieba = ["jieba-rs"]
emote-psb = ["dep:emote-psb", "adler", "lz4"]
# utils feature
utils-bit-stream = []
utils-blowfish = ["byteorder"]
utils-case-insensitive-string = []
utils-crc32 = []
utils-escape = ["fancy-regex"]
utils-mmx = []
utils-pcm = []
utils-psd = ["image", "flate2", "utils-bit-stream"]
utils-rc4 = []
utils-serde-base64bytes = ["base64"]
utils-simple-pack = ["zstd"]
utils-str = []
utils-xored-stream = []
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61", features = ["Win32_Globalization", "Win32_System_Diagnostics_Debug"] }
[build-dependencies]
parse-size = "1.1"