[package]
name = "avml"
version = "0.18.0"
license = "MIT"
description = "A portable volatile memory acquisition tool"
authors = ["avml@microsoft.com"]
keywords = ["linux", "memory-forensics", "security"]
categories = ["command-line-utilities"]
homepage = "https://github.com/microsoft/avml"
repository = "https://github.com/microsoft/avml"
readme = "README.md"
edition = "2024"
rust-version = "1.88.0"

[features]
default = ["put", "blobstore", "native-tls"]
put = ["dep:reqwest", "reqwest?/stream", "dep:url", "dep:tokio", "dep:tokio-util", "dep:futures"]
blobstore = ["dep:url", "dep:azure_core", "dep:azure_storage_blob", "dep:tokio", "dep:async-trait", "dep:futures"]
status = ["dep:indicatif"]
native-tls = ["dep:native-tls", "azure_core?/reqwest", "reqwest?/native-tls-vendored"]

[dependencies]
async-trait = {version="0.1", optional=true}
byteorder = "1.5"
clap = {version="4.6", default-features=false, features=["derive", "std", "usage", "error-context", "help"]}
elf = "0.8"
futures = {version="0.3", optional=true}
snap = "1.1"
thiserror = "2.0"
libc = "0.2"

azure_core = {version="1.0", optional=true, default-features=false, features=["reqwest", "tokio"]}
azure_storage_blob = {version="1.0", optional=true, default-features=false, features=["tokio"]}
indicatif = {version="0.18", optional=true, default-features=false}
native-tls = {version="0.2", features=["vendored"], optional=true, default-features=false}
reqwest = {version="0.13", optional=true, default-features=false}
tokio = {version="1.52", default-features=false, optional=true, features=["fs", "rt-multi-thread", "io-util", "macros"]}
tokio-util = {version="0.7", features=["codec"], optional=true, default-features=false}
url = {version="2.5", optional=true, default-features=false}

[dev-dependencies]
insta = {version="1.47", features=["json"]}
rand = {version="0.10", default-features=false, features=["std_rng"]}
tempfile = "3"

[lints.clippy]
arithmetic_side_effects = "warn"
as_conversions = "warn"
assertions_on_result_states = "warn"
expect_used = "deny"
if_then_some_else_none = "deny"
indexing_slicing = "deny"
manual_assert = "deny"
needless_continue = "warn"
panic = "deny"
pattern_type_mismatch = "warn"
redundant_pub_crate = "deny"
shadow_unrelated = "deny"
std_instead_of_core = "deny"
undocumented_unsafe_blocks = "deny"
unused_trait_names = "warn"
unwrap_used = "deny"
verbose_file_reads = "warn"

[profile.release]
opt-level="z"
lto=true
panic="abort"
codegen-units=1

[[bin]]
name = "avml-upload"
required-features = ["put", "blobstore"]
