# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.93"
name = "reth-codecs"
version = "0.5.2"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Compact codec trait and implementations for Ethereum types."
homepage = "https://paradigmxyz.github.io/reth"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth-core"

[features]
alloy = [
    "dep:alloy-consensus",
    "dep:alloy-eips",
    "dep:alloy-genesis",
    "dep:alloy-trie",
    "dep:reth-zstd-compressors",
]
arbitrary = [
    "alloy-consensus?/arbitrary",
    "alloy-eips?/arbitrary",
    "alloy-primitives/arbitrary",
    "alloy-trie?/arbitrary",
]
default = [
    "std",
    "alloy",
]
serde = [
    "alloy-consensus?/serde",
    "alloy-eips?/serde",
    "alloy-primitives/serde",
    "alloy-trie?/serde",
    "bytes/serde",
]
std = [
    "alloy-primitives/std",
    "bytes/std",
    "alloy-consensus?/std",
    "alloy-eips?/std",
    "alloy-genesis?/std",
    "alloy-trie?/std",
    "serde/std",
    "reth-zstd-compressors?/std",
    "dep:parity-scale-codec",
]
test-utils = [
    "std",
    "alloy",
    "arbitrary",
    "dep:visibility",
    "dep:arbitrary",
]

[lib]
name = "reth_codecs"
path = "src/lib.rs"

[dependencies.alloy-consensus]
version = "2.0"
optional = true
default-features = false

[dependencies.alloy-eips]
version = "2.0"
features = ["serde"]
optional = true
default-features = false

[dependencies.alloy-genesis]
version = "2.0"
optional = true
default-features = false

[dependencies.alloy-primitives]
version = "1.5.6"
features = ["map-foldhash"]
default-features = false

[dependencies.alloy-trie]
version = "0.9.4"
optional = true
default-features = false

[dependencies.arbitrary]
version = "1.3"
features = ["derive"]
optional = true

[dependencies.bytes]
version = "1.11.1"
default-features = false

[dependencies.modular-bitfield]
version = "0.13.1"

[dependencies.parity-scale-codec]
version = "3.2.1"
features = ["bytes"]
optional = true

[dependencies.reth-codecs-derive]
version = "0.5.2"

[dependencies.reth-zstd-compressors]
version = "0.5.2"
optional = true
default-features = false

[dependencies.serde]
version = "1.0"
default-features = false

[dependencies.visibility]
version = "0.1.1"
optional = true

[dev-dependencies.alloy-consensus]
version = "2.0"
features = ["arbitrary"]
default-features = false

[dev-dependencies.alloy-eips]
version = "2.0"
features = [
    "arbitrary",
    "serde",
]
default-features = false

[dev-dependencies.alloy-primitives]
version = "1.5.6"
features = [
    "map-foldhash",
    "arbitrary",
    "serde",
    "rand",
]
default-features = false

[dev-dependencies.arbitrary]
version = "1.3"
features = ["derive"]

[dev-dependencies.proptest]
version = "1.6"

[dev-dependencies.proptest-arbitrary-interop]
version = "0.1"

[dev-dependencies.rstest]
version = "0.26.1"

[dev-dependencies.serde_json]
version = "1.0"
features = ["alloc"]
default-features = false

[dev-dependencies.test-fuzz]
version = "7"

[lints.clippy]
as_ptr_cast_mut = "allow"
borrow_as_ptr = "warn"
branches_sharing_code = "warn"
clear_with_drain = "warn"
cloned_instead_of_copied = "warn"
cognitive_complexity = "allow"
collection_is_never_read = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "allow"
derive_partial_eq_without_eq = "warn"
doc_markdown = "warn"
empty_line_after_doc_comments = "warn"
empty_line_after_outer_attr = "warn"
enum_glob_use = "warn"
equatable_if_let = "warn"
explicit_into_iter_loop = "warn"
explicit_iter_loop = "warn"
fallible_impl_from = "allow"
flat_map_option = "warn"
from_iter_instead_of_collect = "warn"
future_not_send = "allow"
if_not_else = "warn"
if_then_some_else_none = "warn"
implicit_clone = "warn"
imprecise_flops = "warn"
iter_on_empty_collections = "warn"
iter_on_single_items = "warn"
iter_with_drain = "warn"
iter_without_into_iter = "warn"
large_stack_frames = "warn"
manual_assert = "warn"
manual_clamp = "warn"
manual_is_variant_and = "warn"
manual_string_new = "warn"
match_same_arms = "warn"
missing-const-for-fn = "warn"
mutex_integer = "warn"
naive_bytecount = "warn"
needless_bitwise_bool = "warn"
needless_collect = "allow"
needless_continue = "warn"
needless_for_each = "warn"
needless_pass_by_ref_mut = "warn"
non_send_fields_in_send_ty = "allow"
nonstandard_macro_braces = "warn"
option_as_ref_cloned = "warn"
or_fun_call = "warn"
path_buf_push_overwrite = "warn"
read_zero_byte_vec = "warn"
redundant_clone = "warn"
redundant_pub_crate = "allow"
result_large_err = "allow"
significant_drop_in_scrutinee = "allow"
significant_drop_tightening = "allow"
string_lit_as_bytes = "warn"
suboptimal_flops = "warn"
suspicious_operation_groupings = "warn"
too_long_first_doc_paragraph = "allow"
trailing_empty_array = "warn"
trait_duplication_in_bounds = "warn"
transmute_undefined_repr = "warn"
trivial_regex = "warn"
tuple_array_conversions = "warn"
type_repetition_in_bounds = "warn"
uninhabited_references = "warn"
unnecessary_self_imports = "warn"
unnecessary_struct_initialization = "warn"
unnested_or_patterns = "warn"
unused_peekable = "warn"
unused_rounding = "warn"
use_self = "warn"
useless_let_if_seq = "warn"
while_float = "warn"
zero_sized_map_values = "warn"

[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
rust_2024_incompatible_pat = "warn"
unreachable_pub = "warn"
unused_must_use = "deny"

[lints.rust.rust_2018_idioms]
level = "deny"
priority = -1

[lints.rustdoc]
all = "warn"
