malwaredb-server 0.3.2

Server data storage logic for MalwareDB.
Documentation
[package]
name = "malwaredb-server"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Server data storage logic for MalwareDB."
keywords.workspace = true
rust-version.workspace = true
publish.workspace = true
categories = ["database", "data-structures"]
build = "build.rs"

[features]
default = []
admin = []
sqlite = ["dep:rusqlite"]
vt = ["dep:malwaredb-virustotal", "postgres/with-serde_json-1"]
yara = ["dep:yara-x"]

[dependencies]
# Internal dependencies
malwaredb-api = { workspace = true }
malwaredb-types = { workspace = true }

# External
aes-gcm = { workspace = true, features = ["aes", "alloc", "getrandom", "std"] }
anyhow = { workspace = true, features = ["std"] }
app-memory-usage-fetcher = { workspace = true }
argon2 = { workspace = true, features = ["alloc", "password-hash", "std"] }
axum = { workspace = true, features = ["http1", "http2", "json", "macros", "tokio"] }
axum-cbor = { workspace = true }
axum-server = { workspace = true, features = ["tls-rustls", "rustls"] }
base64 = { workspace = true }
cart_container = { workspace = true, features = ["md5", "sha1"] }
chrono = { workspace = true }
chrono-humanize = { workspace = true }
clap = { workspace = true }
constcat = { workspace = true }
deadpool-postgres = { workspace = true, features = ["rt_tokio_1"] }
flate2 = { workspace = true, features = ["rust_backend"] }
fuzzyhash = { workspace = true }
hex = { workspace = true, features = ["alloc", "std"] }
http = { workspace = true }
human-hash = { workspace = true }
humansize = { workspace = true }
magic = { workspace = true }
malwaredb-lzjd = { workspace = true }
malwaredb-virustotal = { workspace = true, features = ["chrono", "tokio"], optional = true }
md-5 = { workspace = true }
mdns-sd = { workspace = true }
num_cpus = { workspace = true }
postgres = { workspace = true, features = ["array-impls", "with-chrono-0_4", "with-uuid-1"] }
postgres-types = { workspace = true, features = ["derive"] }
rc4 = { workspace = true, features = ["std"] }
rusqlite = { workspace = true, features = ["bundled", "chrono", "fallible_uint", "functions", "uuid"], optional = true }
rustls = { workspace = true, features = ["aws-lc-rs"] }
rustls-platform-verifier = { workspace = true }
semver = { workspace = true, features = ["serde", "std"] }
serde_json = { workspace = true }
sha1 = { workspace = true }
sha2 = { workspace = true }
tlsh-fixed = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt", "signal"] }
tokio-postgres-rustls = { workspace = true }
tower-http = { workspace = true, features = ["compression-full", "decompression-full", "limit", "sensitive-headers"] }
tracing = { workspace = true, features = ["attributes"] }
uuid = { workspace = true, features = ["v4", "v7"] }
xor-utils = { workspace = true }
zeroize = { workspace = true, features = ["aarch64"] }
zstd = { workspace = true }

[target.'cfg(not(target_os = "wasi"))'.dependencies]
tokio = { workspace = true, features = ["rt-multi-thread"] }

[target.'cfg(target_family = "windows")'.dependencies]
tokio = { workspace = true, features = ["sync"] }

[target.'cfg(not(windows))'.dependencies]
sha1 = { workspace = true, features = ["asm", "sha1-asm"] }
sha2 = { workspace = true, features = ["asm-aarch64", "sha2-asm"] }

[target.'cfg(target_env = "musl")'.dependencies]
malwaredb-virustotal = { workspace = true, features = ["native-tls-vendored"], optional = true }

# Yara uses Wasmtime, which only supports 64-bit versions of ARM, RISC-V, s390x, and Intel/AMD x86, yet we want to
# support other architectures supported by Rust, including PowerPC.
[target.'cfg(any(target_arch = "aarch64", target_arch = "riscv64", target_arch = "s390x", target_arch = "x86_64"))'.dependencies]
yara-x = { workspace = true, features = ["constant-folding", "crypto", "dex-module", "dotnet-module", "elf-module", "fast-regexp", "hash-module", "linkme", "macho-module", "math-module", "pe-module", "string-module", "time-module", "vt-module"], optional = true }

[dev-dependencies]
malwaredb-client = { workspace = true, features = ["blocking"] }
http-body-util = { workspace = true }
rstest = { workspace = true }
rusqlite = { workspace = true, features = ["uuid"] }
tempfile = { workspace = true }
tokio = { workspace = true }
tower = { workspace = true, features = ["util"] }
tracing-subscriber = { workspace = true }

[target.'cfg(target_os = "windows")'.build-dependencies]
vcpkg = { workspace = true }

[package.metadata.vcpkg]
git = "https://github.com/microsoft/vcpkg"
rev = "4b45178"
dependencies = ["libmagic"]

[package.metadata.vcpkg.target]
aarch64-pc-windows-msvc = { triplet = "arm64-windows-static", dependencies = ["libmagic"] }
x86_64-pc-windows-msvc = { triplet = "x64-windows-static", dependencies = ["libmagic"] }

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]