[workspace]
members = [".", "crates/core", "crates/encode", "crates/decode"]
resolver = "2"

[package]
name = "lz4rip"
description = "Rust LZ4 compression. Fast, with encapsulated unsafe."
version = "0.8.3"
edition = "2021"
rust-version = "1.85"
license = "MIT"
repository = "https://github.com/paddor/lz4rip"
readme = "README.md"
keywords = ["compression", "lz4", "compress", "decompression", "decompress"]
categories = ["compression"]
include = ["src/**/*", "README.md", "LICENSE", "CHANGELOG.md", "DESIGN.md", "SAFETY.md"]

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

[features]
default = ["std", "frame"]
alloc = ["lz4rip-encode/alloc", "lz4rip-decode/alloc"]
frame = ["std", "dep:twox-hash"]
std = ["alloc", "lz4rip-core/std", "lz4rip-encode/std", "lz4rip-decode/std"]
nightly = ["lz4rip-core/nightly", "lz4rip-encode/nightly", "lz4rip-decode/nightly"]

[dependencies]
lz4rip-core = { version = "0.5.0", path = "crates/core", default-features = false }
lz4rip-encode = { version = "0.8.3", path = "crates/encode", default-features = false }
lz4rip-decode = { version = "0.8.2", path = "crates/decode", default-features = false }
twox-hash = { version = "2.0.0", default-features = false, features = ["xxhash32"], optional = true }

[dev-dependencies]
lzzzz = "2.0.0"
more-asserts = "0.3.1"
snap = "1.1.0"
proptest = "1.0.0"
binggan = "0.14.0"
jemallocator = "0.5.4"
libc = "0.2"

[dev-dependencies.lz4_flex_upstream]
git = "https://github.com/PSeitz/lz4_flex"
package = "lz4_flex"

[dev-dependencies.lz4_flex_unsafe]
version = "0.11.5"
package = "lz4_flex"
default-features = false
features = ["std"]


[profile.bench]
codegen-units = 1
lto = true
opt-level = 3

[profile.release]
codegen-units = 1
opt-level = 3
panic = "unwind"

[[example]]
name = "quickstart"
required-features = ["frame"]

[[bench]]
harness = false
name = "binggan_bench"
path = "benches/binggan_bench.rs"

[[bench]]
harness = false
name = "profile_decompress"
path = "benches/profile_decompress.rs"

[[bench]]
harness = false
name = "profile_decompress_c"
path = "benches/profile_decompress_c.rs"

[[bench]]
harness = false
name = "profile_compress"
path = "benches/profile_compress.rs"

[[bench]]
harness = false
name = "profile_compress_c"
path = "benches/profile_compress_c.rs"
