[package]
name = "kathputli"
version = "0.2.1"
edition = "2024"
description = "Minimal typed-mailbox actor framework over Tokio — actors respond to messages like puppets to strings"
license = "MIT OR Apache-2.0"
repository = "https://github.com/manchhq/kathputli"
readme = "README.md"
rust-version = "1.85"
keywords = ["actor", "tokio", "mailbox", "concurrency", "async"]
categories = ["asynchronous", "concurrency"]

# docs.rs builds with default features only; the actor system is behind the
# off-by-default `system` feature, so enable all features (and the `docsrs` cfg
# for feature badges) when building the hosted docs.
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
tokio = { workspace = true, features = ["sync", "rt", "macros"] }
tokio-util = { workspace = true }
anyhow = { workspace = true }
async-trait = { workspace = true }
tracing = { workspace = true, optional = true }
futures-util = { version = "0.3", optional = true, default-features = false, features = ["std"] }
serde = { version = "1", optional = true, features = ["derive"] }

[features]
# Emit a `trace`-level span around every message handled. Off by default so
# actors stay zero-overhead unless a consumer opts in.
tracing = ["dep:tracing"]
# Opt-in supervising actor system: ActorSystem, supervision tree, restart,
# kamikaze one-shot actors, status actor. Pulls futures-util for catch_unwind.
system = ["dep:futures-util"]
# Derive serde::Serialize on status snapshot types (ActorStatus, ActorNode).
serde = ["dep:serde"]

[dev-dependencies]
proptest = "1"
serde_json = "1"
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] }
