[workspace]
members = [".", "crates/hprof-wasm"]
resolver = "2"
[package]
name = "hprof-analyzer"
version = "0.2.0"
edition = "2024"
rust-version = "1.85"
description = "Fast, low-memory Java HPROF heap-dump analyzer with Eclipse MAT-parity reports (System Overview, Leak Suspects, Top Consumers)."
license = "MIT"
repository = "https://github.com/parttimenerd/hprof-analyzer"
readme = "README.md"
authors = ["Johannes Bechberger"]
keywords = ["hprof", "heap-dump", "java", "memory", "oom"]
categories = ["command-line-utilities", "development-tools::profiling"]
exclude = [
"tests/fixtures/*.hprof",
"tests/fixtures/*.hprof.gz",
"tests/fixtures/*.hprof.zip",
"tests/fixtures/*.json",
"tests/fixtures/*.md",
"tests/fixtures/*.index",
"tests/fixtures/*.threads",
"web/dist/*",
"web/node_modules/*",
"dist/*",
".git-worktrees/*",
"docs/*",
"*.png",
]
[[bin]]
name = "hprof-analyzer"
path = "src/main.rs"
[lib]
name = "hprof_analyzer"
path = "src/lib.rs"
crate-type = ["rlib"]
[features]
mat-oracle = []
default = ["native"]
native = ["dep:reedline", "dep:crossterm", "dep:tiny_http", "dep:clap", "dep:clap_complete", "dep:scraper", "dep:zstd", "dep:zip", "dep:tar", "dep:ureq", "dep:self-replace"]
[dependencies]
base64 = "0.22"
tiny_http = { version = "0.12", optional = true }
clap = { version = "4", features = ["derive"], optional = true }
clap_complete = { version = "4", optional = true }
flate2 = "1"
zstd = { version = "0.13", default-features = false, optional = true }
zip = { version = "2", default-features = false, features = ["deflate"], optional = true }
tar = { version = "0.4", optional = true }
ureq = { version = "3", default-features = false, features = ["rustls"], optional = true }
self-replace = { version = "1", optional = true }
scraper = { version = "0.27", optional = true }
schemars = "=1.2.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = { version = "0.8", default-features = false, features = ["parse"] }
chumsky = "0.13.0"
ariadne = "0.6.0"
logos = "0.16.1"
reedline = { version = "0.43", optional = true }
crossterm = { version = "0.28", optional = true }
regex = "1"
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[dev-dependencies]
cargo-husky = { version = "1.5.0", features = ["precommit-hook", "run-cargo-fmt", "user-hooks"] }
jsonschema = "0.47.0"
proptest = "1"
tar = "0.4"
tempfile = "3"
[build-dependencies]
flate2 = "1"
[lints.clippy]
needless_range_loop = "allow"
ptr_arg = "allow"
collapsible_if = "allow"
too_many_arguments = "allow"
redundant_closure_call = "allow"
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
[profile.fast]
inherits = "release"
lto = false
codegen-units = 256
panic = "abort"