# 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"
name = "near-async"
version = "0.35.1"
authors = ["Near Inc <hello@nearprotocol.com>"]
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "This crate contains the async helpers specific for nearcore"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/near/nearcore"
resolver = "2"

[features]
actor_instrumentation_testing = ["rand"]

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

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

[dependencies.crossbeam-channel]
version = "0.5.8"

[dependencies.futures]
version = "0.3.5"

[dependencies.near-async-derive]
version = "0.35.1"

[dependencies.near-o11y]
version = "0.35.1"

[dependencies.near-time]
version = "0.35.1"
features = ["clock"]

[dependencies.parking_lot]
version = "0.12.1"

[dependencies.rand]
version = "0.8.5"
optional = true

[dependencies.serde]
version = "1.0.136"
features = [
    "alloc",
    "derive",
    "rc",
]

[dependencies.serde_json]
version = "1.0.68"

[dependencies.time]
version = "0.3.9"
default-features = false

[dependencies.tokio]
version = "1.28"
features = [
    "rt",
    "rt-multi-thread",
    "macros",
]
default-features = false

[dependencies.tokio-util]
version = "0.7.1"
features = [
    "codec",
    "io",
]

[dependencies.tracing]
version = "0.1.40"
features = ["std"]

[dev-dependencies.criterion]
version = "0.7.0"
features = [
    "html_reports",
    "cargo_bench_support",
]
default-features = false

[dev-dependencies.tokio-util]
version = "0.7.1"
features = [
    "codec",
    "io",
]

[lints.clippy]
assigning_clones = "deny"
clone_on_copy = "deny"
derivable_impls = "deny"
disallowed_types = "deny"
explicit_deref_methods = "deny"
explicit_into_iter_loop = "deny"
explicit_iter_loop = "deny"
flat_map_option = "deny"
inefficient_to_string = "deny"
large_futures = "deny"
large_stack_frames = "deny"
large_types_passed_by_value = "deny"
len_zero = "deny"
manual_is_variant_and = "deny"
needless_collect = "deny"
needless_pass_by_ref_mut = "deny"
or_fun_call = "deny"
redundant_clone = "deny"
same_functions_in_if_condition = "deny"
single_char_pattern = "allow"
unchecked_duration_subtraction = "deny"
unnecessary_box_returns = "deny"
unnecessary_join = "deny"
unnecessary_lazy_evaluations = "deny"
unused_async = "deny"

[lints.clippy.all]
level = "allow"
priority = -100

[lints.clippy.correctness]
level = "deny"
priority = -50

[lints.clippy.perf]
level = "deny"
priority = -50

[lints.clippy.suspicious]
level = "deny"
priority = -50

[lints.rust.unexpected_cfgs]
level = "allow"
priority = 0
check-cfg = ["cfg(enable_const_type_id)"]
