# 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.92"
name = "hannibal"
version = "0.17.0"
authors = ["Hendrik Sollich <hendrik@hoodie.de>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A small actor library"
documentation = "https://docs.rs/hannibal/"
readme = "README.md"
keywords = [
    "actor",
    "stream",
]
categories = ["asynchronous"]
license = "MIT/Apache-2.0"
repository = "https://github.com/hoodie/hannibal"

[features]
async_runtime = [
    "runtime",
    "dep:async-io",
    "dep:async-global-executor",
]
default = ["tokio_runtime"]
runtime = []
tokio = [
    "dep:tokio",
    "async-global-executor/tokio",
]
tokio_runtime = [
    "runtime",
    "dep:tokio",
    "async-global-executor/tokio",
]

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

[[example]]
name = "broker"
path = "examples/broker.rs"
required-features = ["runtime"]

[[example]]
name = "builder"
path = "examples/builder.rs"
required-features = ["runtime"]

[[example]]
name = "children"
path = "examples/children.rs"
required-features = ["runtime"]

[[example]]
name = "intervals"
path = "examples/intervals.rs"
required-features = ["runtime"]

[[example]]
name = "owning_addr"
path = "examples/owning_addr.rs"
required-features = ["runtime"]

[[example]]
name = "panics"
path = "examples/panics.rs"

[[example]]
name = "ping"
path = "examples/ping.rs"
required-features = ["runtime"]

[[example]]
name = "signal-service"
path = "examples/signal-service.rs"
required-features = ["runtime"]

[[example]]
name = "simple"
path = "examples/simple.rs"
required-features = ["runtime"]

[[example]]
name = "simple-channels-only"
path = "examples/simple-channels-only.rs"
required-features = ["tokio"]

[[example]]
name = "storage-service"
path = "examples/storage-service.rs"
required-features = ["runtime"]

[[example]]
name = "streams"
path = "examples/streams.rs"
required-features = ["runtime"]

[[example]]
name = "streams_collector"
path = "examples/streams_collector.rs"

[[example]]
name = "time-service"
path = "examples/time-service.rs"
required-features = ["runtime"]

[[example]]
name = "timeout"
path = "examples/timeout.rs"
required-features = ["runtime"]

[[example]]
name = "use-after-stop"
path = "examples/use-after-stop.rs"

[[test]]
name = "builder"
path = "tests/builder.rs"

[[test]]
name = "interval_overload"
path = "tests/interval_overload.rs"

[[test]]
name = "panic_handling"
path = "tests/panic_handling.rs"

[[test]]
name = "task_gc"
path = "tests/task_gc.rs"

[dependencies.async-channel]
version = "2.5.0"

[dependencies.async-global-executor]
version = "3"
optional = true

[dependencies.async-io]
version = "2.6.0"
optional = true

[dependencies.async-lock]
version = "3"

[dependencies.dyn-clone]
version = "1.0"

[dependencies.futures]
version = "0.3"

[dependencies.hannibal-derive]
version = "0.17.0"

[dependencies.log]
version = "0.4"
features = ["kv"]

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "1"
features = ["full"]
optional = true

[dev-dependencies.assert_matches]
version = "1.5"

[dev-dependencies.async-signals]
version = "0.5.0"

[dev-dependencies.color-backtrace]
version = "0.7"

[dev-dependencies.env_logger]
version = "0.11"
features = ["unstable-kv"]

[dev-dependencies.libc]
version = "0.2"

[dev-dependencies.test-log]
version = "0.2"

[dev-dependencies.tokio]
version = "1"
features = ["full"]

[dev-dependencies.trybuild]
version = "1"

[lints.clippy]
cast_lossless = "warn"
cast_possible_truncation = "warn"
clone_on_ref_ptr = "warn"
complexity = "warn"
correctness = "warn"
dbg_macro = "warn"
doc_markdown = "warn"
expect_used = "warn"
indexing_slicing = "warn"
manual_filter_map = "warn"
map_clone = "warn"
missing_const_for_fn = "warn"
missing_panics_doc = "warn"
needless_collect = "warn"
redundant_clone = "warn"
redundant_closure_for_method_calls = "warn"
style = "warn"
too_many_arguments = "warn"
useless_format = "warn"

[lints.rust]
missing_copy_implementations = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "forbid"
unsafe_code = "forbid"
unstable_features = "warn"
unused_import_braces = "forbid"
