2026-04-21 23:00:47 -04:00
|
|
|
[package]
|
|
|
|
|
name = "quicksearch-core"
|
|
|
|
|
version.workspace = true
|
|
|
|
|
edition.workspace = true
|
2026-08-02 19:04:30 -04:00
|
|
|
license.workspace = true
|
|
|
|
|
authors.workspace = true
|
|
|
|
|
repository.workspace = true
|
|
|
|
|
description = "Indexing, storage and search engine behind QuickSearch."
|
2026-04-21 23:00:47 -04:00
|
|
|
|
|
|
|
|
[lib]
|
|
|
|
|
name = "quicksearch_core"
|
|
|
|
|
path = "src/lib.rs"
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
2026-08-02 20:21:19 -04:00
|
|
|
# `bundled-sqlcipher-vendored-openssl` compiles the SQLCipher amalgamation
|
|
|
|
|
# (a superset of the stock SQLite `bundled` build — FTS5 etc. included) and
|
|
|
|
|
# statically links a vendored OpenSSL libcrypto, so encryption support adds
|
|
|
|
|
# no runtime library dependencies. With no `PRAGMA key` applied, SQLCipher
|
|
|
|
|
# behaves identically to stock SQLite, so unencrypted indexes are unaffected.
|
|
|
|
|
rusqlite = { version = "0.39", features = ["bundled-sqlcipher-vendored-openssl"] }
|
|
|
|
|
argon2 = { version = "0.5", features = ["zeroize"] }
|
|
|
|
|
zeroize = { version = "1", features = ["derive"] }
|
|
|
|
|
getrandom = "0.2"
|
2026-04-21 23:00:47 -04:00
|
|
|
sha2 = "0.10.8"
|
|
|
|
|
walkdir = "2.5.0"
|
2026-08-02 22:21:39 -04:00
|
|
|
# Default features pull in zstd 0.11, which cannot unify with our zstd 0.13 below
|
|
|
|
|
# and so builds a second copy of the wrapper crates. We only read OOXML/ODF
|
|
|
|
|
# containers (docx/xlsx/pptx/odt/ods/odp), whose entries are always deflate or
|
|
|
|
|
# stored, so zstd/bzip2/aes-crypto are all dead weight here.
|
|
|
|
|
zip = { version = "0.6", default-features = false, features = ["deflate"] }
|
2026-04-21 23:00:47 -04:00
|
|
|
quick-xml = "0.31"
|
2026-08-05 18:05:04 -04:00
|
|
|
# OLE2 compound-file reader, for the pre-2007 binary Office formats
|
|
|
|
|
# (.doc/.xls/.ppt) whose text lives in named streams rather than a zip. Already
|
|
|
|
|
# in the lockfile transitively via infer, so naming it directly compiles
|
|
|
|
|
# nothing new.
|
|
|
|
|
cfb = "0.7"
|
2026-04-21 23:00:47 -04:00
|
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
|
|
|
toml = "0.8"
|
|
|
|
|
mime_guess = "2.0"
|
|
|
|
|
infer = "0.15"
|
2026-08-03 12:33:47 -04:00
|
|
|
# Charset decoding for non-UTF-8 text (UTF-16 .reg exports, legacy
|
|
|
|
|
# single-byte and CJK encodings). Already in the lockfile transitively via
|
|
|
|
|
# pdf-extract, so naming it directly compiles nothing new.
|
|
|
|
|
encoding_rs = "0.8"
|
|
|
|
|
# Statistical charset detection (Firefox's detector) for text that is neither
|
|
|
|
|
# UTF-8 nor BOM-marked. Its mandatory deps beyond encoding_rs are tiny
|
|
|
|
|
# (cfg-if, memchr, detone).
|
|
|
|
|
chardetng = "1.0"
|
|
|
|
|
# RTF text extraction. Pure Rust; with the default `jsbindings` feature off
|
|
|
|
|
# (it exists for the crate's WASM build) it depends only on serde.
|
|
|
|
|
rtf-parser = { version = "0.4", default-features = false }
|
2026-08-05 19:17:11 -04:00
|
|
|
# `lopdf` is deliberately NOT declared here. `pdf-extract` re-exports it
|
|
|
|
|
# (`pub use lopdf::*`), and `extract/pdf.rs` reaches it that way. Naming it
|
|
|
|
|
# directly resolves a *second*, older copy alongside pdf-extract's — which is
|
|
|
|
|
# what used to make every PDF parse twice, and what pulled in rayon (whose
|
|
|
|
|
# global thread pool is never torn down), chrono, time, md5 and a second nom.
|
2026-08-02 19:04:30 -04:00
|
|
|
pdf-extract = "0.12"
|
2026-04-21 23:00:47 -04:00
|
|
|
lofty = "0.19"
|
|
|
|
|
kamadak-exif = "0.5"
|
|
|
|
|
notify = "6.1"
|
|
|
|
|
ctrlc = "3.4"
|
2026-04-23 17:46:11 -04:00
|
|
|
zstd = "0.13"
|
2026-08-02 19:04:30 -04:00
|
|
|
globset = "0.4"
|
|
|
|
|
regex = "1"
|
2026-08-09 18:36:47 -04:00
|
|
|
# SIMD substring search for the full-text passes. `str::match_indices` uses
|
|
|
|
|
# std's Two-Way searcher, which has no vector prefilter: measured against a
|
|
|
|
|
# 256 KiB body (`benches/search.rs`, group `substring`) it runs 111 µs where
|
|
|
|
|
# `memmem` runs 2.4 µs, and the full-text passes scan a body per candidate
|
|
|
|
|
# row. Already in the lockfile transitively (regex, globset, chardetng), so
|
|
|
|
|
# naming it directly compiles nothing new.
|
|
|
|
|
memchr = "2"
|
2026-08-02 19:04:30 -04:00
|
|
|
|
2026-08-03 03:06:19 -04:00
|
|
|
# `nice()`, for dropping indexing threads to background scheduling priority.
|
|
|
|
|
# Linux schedules per task, so it affects only the calling thread. Already in
|
|
|
|
|
# the lockfile transitively (rusqlite, getrandom), so naming it directly
|
|
|
|
|
# compiles nothing new.
|
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
|
|
|
libc = "0.2"
|
|
|
|
|
|
2026-08-02 19:04:30 -04:00
|
|
|
# `GetDriveTypeW` (a mapped drive letter is the only way to spot an SMB share
|
2026-08-05 18:05:04 -04:00
|
|
|
# that isn't written as UNC) plus the FILE_ATTRIBUTE_* constants, which
|
|
|
|
|
# `platform.rs` spells out for itself so its tests run on Linux and then
|
|
|
|
|
# const-asserts against this crate on Windows builds.
|
|
|
|
|
# Pinned to 0.52 deliberately: walkdir → winapi-util already
|
2026-08-02 19:04:30 -04:00
|
|
|
# resolves exactly that version, so this adds no new crate compilations.
|
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
|
|
|
# GetDriveTypeW and the FILE_ATTRIBUTE_* constants live in
|
|
|
|
|
# Win32_Storage_FileSystem; DRIVE_REMOTE, oddly, is filed under
|
2026-08-03 03:06:19 -04:00
|
|
|
# Win32_System_WindowsProgramming. Win32_System_Threading carries
|
|
|
|
|
# SetThreadPriority and THREAD_MODE_BACKGROUND_BEGIN, and both it and
|
|
|
|
|
# GetCurrentThread need Win32_Foundation for HANDLE/BOOL.
|
2026-08-02 19:04:30 -04:00
|
|
|
windows-sys = { version = "0.52", features = [
|
2026-08-03 03:06:19 -04:00
|
|
|
"Win32_Foundation",
|
2026-08-05 18:05:04 -04:00
|
|
|
# SECURITY_ATTRIBUTES, which `CreateFileW`'s signature names even though
|
|
|
|
|
# the directory-count path passes null for it.
|
|
|
|
|
"Win32_Security",
|
2026-08-02 19:04:30 -04:00
|
|
|
"Win32_Storage_FileSystem",
|
2026-08-03 03:06:19 -04:00
|
|
|
"Win32_System_Threading",
|
2026-08-02 19:04:30 -04:00
|
|
|
"Win32_System_WindowsProgramming",
|
|
|
|
|
] }
|
2026-08-09 18:36:47 -04:00
|
|
|
|
|
|
|
|
# Microbenchmark harness for `benches/`. Criterion is the more common choice
|
|
|
|
|
# and was rejected: it pulls rayon (a global thread pool that never tears
|
|
|
|
|
# down, the same reason `lopdf` is not named directly above) plus plotters and
|
|
|
|
|
# clap, some forty crates. Divan's mandatory set is a handful and it spawns no
|
|
|
|
|
# threads of its own.
|
|
|
|
|
[dev-dependencies]
|
|
|
|
|
divan = "0.1"
|
|
|
|
|
|
|
|
|
|
# `harness = false` on both: divan supplies its own `main` via `divan::main()`,
|
|
|
|
|
# so libtest must not also link one in.
|
|
|
|
|
[[bench]]
|
|
|
|
|
name = "search"
|
|
|
|
|
harness = false
|
|
|
|
|
|
|
|
|
|
[[bench]]
|
|
|
|
|
name = "index"
|
|
|
|
|
harness = false
|