-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
122 lines (112 loc) · 4.99 KB
/
Cargo.toml
File metadata and controls
122 lines (112 loc) · 4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[package]
name = "fstool"
version = "0.4.4"
edition = "2024"
rust-version = "1.85"
description = "Build disk images and filesystems (ext2/3/4, MBR, GPT) from a directory tree and TOML spec, in the spirit of genext2fs."
license = "MIT"
repository = "https://github.com/KarpelesLab/fstool"
readme = "README.md"
keywords = ["filesystem", "ext4", "ext2", "gpt", "image"]
categories = ["filesystem", "command-line-utilities"]
[lib]
name = "fstool"
path = "src/lib.rs"
[[bin]]
name = "fstool"
path = "src/bin/fstool/main.rs"
[features]
# Compression codecs for SquashFS reads and `.tar.<algo>` streaming I/O.
# Enabled by default; disable with `default-features = false` and pick
# a subset if you want to slim the binary or avoid a C-bundled build.
#
# Archive backends (zip / cpio / ar) are always compiled — they add no new
# dependencies (zip's DEFLATE rides the `gzip` feature; cpio/ar need no
# codec). The detection-only scaffolds (7z / rar / arc / lha / lzx / cab /
# sit) are likewise always present; when a pure-Rust decoder is wired for
# one, it gains its own optional dependency behind a per-format feature
# here, matching the codec pattern above.
default = ["gzip", "xz", "lzma", "lz4", "zstd", "lzo", "dmg-bzip2", "dmg-lzfse", "dmg-encrypted"]
gzip = ["dep:flate2"]
xz = ["dep:lzma-rs"]
lzma = ["dep:lzma-rs"]
lz4 = ["dep:lz4_flex"]
zstd = ["dep:zstd"]
lzo = ["dep:minilzo-rs"]
# DMG chunk codecs beyond the always-available zero / raw / zlib / ADC set.
# bzip2-rs is a pure-Rust decoder, lzfse_rust is a pure-Rust LZFSE
# decoder; both gated so a slim build can drop them.
dmg-bzip2 = ["dep:bzip2-rs"]
dmg-lzfse = ["dep:lzfse_rust"]
# Password-protected DMG read support (`encrcdsa` v2). Pulls in the
# RustCrypto AES/DES/CBC/HMAC/SHA1/PBKDF2 crates — all pure Rust. Gated
# so a slim build can drop them.
dmg-encrypted = [
"dep:aes",
"dep:cbc",
"dep:cipher",
"dep:des",
"dep:hmac",
"dep:sha1",
"dep:pbkdf2",
]
# FUSE adapter: enables the `fstool mount` subcommand which exposes an
# ext{2,3,4} image as a userspace filesystem via libfuse (Linux) or
# macFUSE (macOS). Off by default so the core build doesn't need a C
# FUSE library on the host; opt in with `--features fuse`.
fuse = ["dep:fuser"]
[dependencies]
thiserror = "2"
log = "0.4"
uuid = { version = "1", features = ["v4"] }
crc32fast = "1"
clap = { version = "4", features = ["derive"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1"
toml = "1.1.2"
crc32c = "0.6.8"
# CP949 (Korean) ↔ UTF-8 for the GRF backend (Gravity Ragnarok archives
# store filenames in CP949). encoding_rs's `EUC_KR` label is the WHATWG
# alias that covers CP949 — the spec mapping is identical in practice.
encoding_rs = "0.8"
# Used to spool compressed tar streams to a temp file when reading or
# writing `.tar.gz` / `.tar.zst` / etc., so we don't have to hold the
# whole archive in RAM. Cheap dep; already in dev-dependencies.
tempfile = "3"
# Compression codecs — all optional and feature-gated. Pure-rust where
# possible (flate2 via miniz_oxide, lz4_flex, lzma-rs); zstd and lzo
# pull in bundled C source.
flate2 = { version = "1", optional = true, default-features = false, features = ["rust_backend"] }
lzma-rs = { version = "0.3", optional = true }
lz4_flex = { version = "0.11", optional = true, default-features = false, features = ["std", "safe-encode", "safe-decode", "frame"] }
zstd = { version = "0.13", optional = true }
"minilzo-rs" = { version = "0.6", optional = true }
# DMG codec deps. bzip2-rs is decode-only pure Rust; lzfse_rust is a
# pure-Rust LZFSE encoder + decoder. Both opt-in via dmg-bzip2 /
# dmg-lzfse features so a build without DMG support can drop them.
bzip2-rs = { version = "0.1", optional = true }
lzfse_rust = { version = "0.2", optional = true }
# Encrypted DMG (encrcdsa v2) deps — all pure-Rust from the RustCrypto
# organization. Opt-in via the `dmg-encrypted` feature.
aes = { version = "0.8", optional = true }
cbc = { version = "0.1", optional = true, features = ["std"] }
cipher = { version = "0.4", optional = true, features = ["block-padding"] }
des = { version = "0.8", optional = true }
hmac = { version = "0.12", optional = true }
sha1 = { version = "0.10", optional = true }
pbkdf2 = { version = "0.12", optional = true, default-features = false, features = ["hmac"] }
# FUSE adapter — Linux uses libfuse, macOS uses macFUSE. Off by default
# (see the `fuse` feature). `fuser` is the maintained successor to
# `fuse-rs` and tracks the libfuse 3.x ABI. We enable the default
# `libfuse` feature so the build links against the system FUSE
# library; running `cargo build --features fuse` therefore requires
# libfuse-dev (Linux) or macFUSE (macOS) installed on the host.
fuser = { version = "0.16", optional = true, features = ["libfuse"] }
# Needed on Unix for the BLKGETSIZE64 / DKIOCGETBLOCKCOUNT ioctls used to
# query the size of a block device, plus the O_EXCL open flag that refuses
# devices with a mounted partition.
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[dev-dependencies]
tempfile = "3"
env_logger = "0.11"