-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
266 lines (224 loc) · 7.88 KB
/
Copy pathCargo.toml
File metadata and controls
266 lines (224 loc) · 7.88 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
[package]
name = "transmutation"
version = "0.3.5"
edition = "2024"
authors = ["HiveLLM Team <[email protected]>"]
license = "MIT"
description = "High-performance document conversion engine for AI/LLM embeddings - 27 formats supported"
repository = "https://github.com/hivellm/transmutation"
homepage = "https://hivellm.org/transmutation"
documentation = "https://docs.rs/transmutation"
keywords = ["document", "conversion", "pdf", "llm", "embedding"]
categories = ["parser-implementations", "text-processing", "multimedia"]
readme = "README.md"
rust-version = "1.88"
exclude = [
"data/*",
"docling_parse",
"docling-parse/",
"build_*",
"libs/",
"*.pdf",
"*.mp3",
"*.mp4",
".github/",
]
# WiX Installer metadata for Windows MSI generation
[package.metadata.wix]
upgrade-guid = "12345678-1234-1234-1234-123456789012"
path-guid = "87654321-4321-4321-4321-210987654321"
license = "wix/License.rtf"
eula = true
[lib]
name = "transmutation"
path = "src/lib.rs"
[[bin]]
name = "transmutation"
path = "src/bin/transmutation.rs"
required-features = ["cli"]
[dependencies]
# Async runtime
tokio = { version = "1.53", features = ["full"] }
async-trait = "0.1"
futures = "0.3"
# Error handling
thiserror = "2.0"
anyhow = "1.0"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# File I/O and path handling
walkdir = "2.5"
tempfile = "3.27"
mime = "0.3"
mime_guess = "2.0"
# Hashing and crypto
sha2 = "0.11"
blake3 = "1.8"
# Logging and tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tracing-opentelemetry = { version = "0.33", optional = true }
# File type detection
file-format = "0.29"
# NOTE: We are NOT integrating with Docling - we are building a pure Rust competitor
# The docling repository is for reference only, not as a dependency
# OCR (Tesseract)
tesseract = { version = "0.15", optional = true }
leptess = { version = "0.14", optional = true }
# Image processing
image = { version = "0.25", features = ["png", "jpeg", "gif", "bmp", "tiff", "webp"] }
imageproc = "0.27"
# ML & Computer Vision (for docling-ffi feature)
ort = { version = "2.0.0-rc.10", optional = true, features = ["download-binaries"] }
ndarray = { version = "0.15", optional = true }
# Spatial indexing
rstar = { version = "0.12", optional = true }
# Document parsing - Core formats (always enabled)
# PDF
lopdf = "0.44"
pdf-extract = "0.12"
pdfium-render = { version = "0.9", optional = true } # Only for PDF rendering to images
# HTML/XML
scraper = "0.27"
html5ever = "0.39"
quick-xml = "0.41"
roxmltree = { version = "0.21", optional = true }
# Archives (ZIP always enabled for core functionality)
zip = "8.6"
tar = { version = "0.4", optional = true }
flate2 = { version = "1.1", optional = true }
sevenz-rust = { version = "0.6", optional = true }
# Office formats (optional)
docx-rs = { version = "0.4", optional = true }
umya-spreadsheet = { version = "3.0", optional = true }
# Markdown
pulldown-cmark = "0.13"
comrak = { version = "0.54", default-features = false }
regex = "1.13"
once_cell = "1.21"
# Note: Audio/Video use external ffmpeg and whisper CLI tools (no Rust crates needed)
# Parallelism
rayon = "1.12"
num_cpus = "1.17"
# System directories
dirs = "6.0"
# CLI dependencies
clap = { version = "4.6", features = ["derive", "cargo", "env"], optional = true }
indicatif = { version = "0.18", optional = true }
console = { version = "0.16", optional = true }
colored = { version = "3.1", optional = true }
# Note: External integrations removed (cache, HTTP, metrics)
# Transmutation is a library/CLI - external features are handled by HiveLLM Vectorizer
[dev-dependencies]
criterion = { version = "0.8", features = ["async_tokio", "html_reports"] }
pretty_assertions = "1.4"
proptest = "1.11"
tempfile = "3.27"
mockall = "0.15"
tokio-test = "0.4"
[build-dependencies]
# Windows resource compiler for embedding icons (only needed for CLI binary)
winres = { version = "0.1", optional = true }
[features]
default = ["office"] # Core formats (PDF, HTML, XML, ZIP) are always enabled
# Core engines (pure Rust implementations)
tesseract = ["dep:tesseract", "dep:leptess"]
# Format support (pure Rust implementations)
# Note: PDF, HTML, XML, and basic ZIP support are ALWAYS enabled (no feature flags)
pdf-to-image = ["dep:pdfium-render"] # PDF rendering to images per page (optional)
office = ["docx-rs", "umya-spreadsheet"] # Office formats (DOCX, XLSX, PPTX)
image-ocr = ["tesseract"]
audio = [] # Audio transcription (requires external whisper CLI)
video = [] # Video transcription (requires external ffmpeg + whisper CLI)
archives-extended = ["tar", "flate2", "sevenz-rust"] # Extended archive support (TAR, GZ, 7Z)
# Advanced layout analysis (C++ FFI to docling-parse + ML models)
docling-ffi = ["dep:ort", "dep:ndarray", "dep:rstar", "dep:pdfium-render"] # Enable C++ docling-parse + ONNX ML models
# CLI
cli = ["clap", "indicatif", "console", "colored", "winres"]
# All features (no external integrations - Transmutation is a library/CLI)
full = [
"pdf-to-image",
"office",
"image-ocr",
"audio",
"video",
"archives-extended",
"cli",
]
# Benchmarks removed - files don't exist yet
# TODO: Re-add when benchmark files are created
# [[bench]]
# name = "conversion_benchmarks"
# harness = false
#
# [[bench]]
# name = "pipeline_benchmark"
# harness = false
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
[profile.bench]
opt-level = 3
lto = true
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
# =============================================================================
# WORKSPACE LINTS (Based on Qdrant standards)
# =============================================================================
[lints.clippy]
# With the MSRV now at 1.88, let-chains are stable, so clippy's `collapsible_if`
# starts suggesting the collapse of nested `if`/`if let` (deeply nested in the
# PDF/HTML parsers). Adopting let-chains across the codebase is a separate
# refactor; keep the lint off here rather than churn unrelated code in a
# dependency-update change.
collapsible_if = "allow"
cast_lossless = "warn"
doc_link_with_quotes = "warn"
enum_glob_use = "warn"
explicit_into_iter_loop = "warn"
filter_map_next = "warn"
flat_map_option = "warn"
implicit_clone = "warn"
inconsistent_struct_constructor = "warn"
inefficient_to_string = "warn"
manual_is_variant_and = "warn"
manual_let_else = "warn"
needless_continue = "warn"
needless_raw_string_hashes = "warn"
ptr_as_ptr = "warn"
ref_option_ref = "warn"
uninlined_format_args = "warn"
unnecessary_wraps = "warn"
unused_self = "warn"
used_underscore_binding = "warn"
match_wildcard_for_single_variants = "warn"
needless_pass_by_ref_mut = "warn"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }
[lints.rustdoc]
private_intra_doc_links = "allow"
# =============================================================================
# DEBIAN PACKAGE METADATA
# =============================================================================
[package.metadata.deb]
maintainer = "HiveLLM Team <[email protected]>"
depends = "$auto"
license-file = ["LICENSE", "0"]
section = "text"
priority = "optional"
extended-description = """\
Transmutation is a high-performance document conversion engine for AI/LLM embeddings. \
Supports 27+ formats including PDF, Office docs, images, audio, and video. \
Built in Rust for maximum performance and safety.\
"""
assets = [
["target/release/transmutation", "usr/bin/", "755"],
["README.md", "usr/share/doc/transmutation/README", "644"],
["LICENSE", "usr/share/doc/transmutation/LICENSE", "644"],
]
conf-files = []
maintainer-scripts = "debian/"