[workspace]
members = ["crates/ruststream-macros"]
[workspace.package]
version = "0.2.3"
edition = "2024"
rust-version = "1.85"
license = "Apache-2.0"
repository = "https://github.com/powersemmi/ruststream"
authors = ["RustStream contributors"]
[[bin]]
name = "ruststream"
path = "src/bin/ruststream/main.rs"
required-features = ["cli"]
[[example]]
name = "macro_app"
required-features = ["macros", "memory"]
[[example]]
name = "routed_service"
path = "examples/routed_service/main.rs"
required-features = ["macros", "memory", "json"]
[[example]]
name = "quickstart"
required-features = ["macros", "memory", "json"]
[[example]]
name = "asyncapi_http"
required-features = ["macros", "memory", "asyncapi"]
[[example]]
name = "metrics_http"
required-features = ["macros", "memory", "metrics"]
[[example]]
name = "logging"
required-features = ["macros", "memory", "json", "logging"]
[package]
name = "ruststream"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
description = "Async messaging framework for Rust: broker-agnostic traits, router, codecs, and a conformance harness for broker authors."
readme = "README.md"
keywords = ["messaging", "async", "broker", "faststream", "nats"]
categories = ["asynchronous", "network-programming"]
[features]
default = ["json"]
memory = ["dep:tokio-stream"]
conformance = []
json = ["dep:serde_json"]
msgpack = ["dep:rmp-serde"]
cbor = ["dep:ciborium"]
macros = ["dep:ruststream-macros"]
asyncapi = ["json", "dep:schemars", "dep:serde_norway"]
metrics = ["dep:prometheus"]
logging = ["dep:tracing-subscriber"]
cli = ["dep:clap", "dep:anyhow"]
[dependencies]
bytes = "1"
futures = "0.3"
serde = { version = "1", features = ["derive"] }
thiserror = "2"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time", "signal"] }
tokio-util = { version = "0.7", features = ["rt"] }
tracing = "0.1"
ruststream-macros = { version = "0.2.3", path = "crates/ruststream-macros", optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
serde_json = { version = "1", optional = true }
rmp-serde = { version = "1", optional = true }
ciborium = { version = "0.2", optional = true }
prometheus = { version = "0.13", default-features = false, optional = true }
schemars = { version = "0.8", optional = true }
serde_norway = { version = "0.9", optional = true }
tokio-stream = { version = "0.1", optional = true }
clap = { version = "4", features = ["derive"], optional = true }
anyhow = { version = "1", optional = true }
[dev-dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time", "net"] }
tokio-stream = "0.1"
tempfile = "3"
axum = "0.8"
[lints.rust]
unsafe_op_in_unsafe_fn = "deny"
unreachable_pub = "deny"
missing_docs = "deny"
missing_debug_implementations = "warn"
unused_qualifications = "warn"
[lints.clippy]
correctness = { level = "deny", priority = -1 }
suspicious = { level = "deny", priority = -1 }
perf = { level = "deny", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
module_name_repetitions = "allow"
missing_const_for_fn = "allow"
multiple_crate_versions = "allow"
redundant_pub_crate = "allow"