[package]
edition = "2024"
rust-version = "1.88"
name = "ruststream"
version = "0.7.0-rc.6"
authors = ["RustStream contributors"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
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",
"pubsub",
"event-driven",
]
categories = [
"asynchronous",
"network-programming",
]
license = "Apache-2.0"
repository = "https://github.com/powersemmi/ruststream"
[package.metadata.docs.rs]
all-features = true
[package.metadata.cargo_check_external_types]
allowed_external_types = [
"ruststream_macros::*",
"serde::*",
"serde_core::*",
"bytes::bytes::Bytes",
"bytes::bytes_mut::BytesMut",
"futures_core::stream::Stream",
"tokio::runtime::task::error::JoinError",
"inventory::Collect",
"schemars",
"serde_json::error::Error",
"serde_json::value::Value",
"serde_norway::error::Error",
"prometheus::errors::Error",
"prometheus::registry::Registry",
"tracing_subscriber::filter::directive::ParseError",
"opentelemetry_otlp::exporter::ExporterBuildError",
"opentelemetry_sdk::error::OTelSdkError",
"opentelemetry_sdk::metrics::meter_provider::SdkMeterProvider",
"opentelemetry_sdk::trace::provider::SdkTracerProvider",
]
[features]
asyncapi = [
"json",
"dep:schemars",
"dep:serde_norway",
]
cbor = ["dep:ciborium"]
cli = [
"dep:clap",
"dep:anyhow",
]
conformance = ["testing"]
default = ["json"]
json = ["dep:serde_json"]
logging = ["dep:tracing-subscriber"]
macros = ["dep:ruststream-macros"]
memory = []
metrics = ["dep:prometheus"]
msgpack = ["dep:rmp-serde"]
otel = [
"dep:opentelemetry",
"dep:opentelemetry_sdk",
"dep:opentelemetry-otlp",
"dep:tracing-opentelemetry",
"dep:tracing-subscriber",
]
testing = [
"dep:inventory",
"tokio/test-util",
]
[lib]
name = "ruststream"
path = "src/lib.rs"
[[bin]]
name = "ruststream"
path = "src/bin/ruststream/main.rs"
required-features = ["cli"]
[[example]]
name = "asyncapi_http"
path = "examples/asyncapi_http.rs"
required-features = [
"macros",
"memory",
"asyncapi",
]
[[example]]
name = "codecs"
path = "examples/codecs.rs"
required-features = [
"macros",
"memory",
"json",
"cbor",
]
[[example]]
name = "context"
path = "examples/context.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "context_field"
path = "examples/context_field.rs"
[[example]]
name = "ctx_extractor"
path = "examples/ctx_extractor.rs"
required-features = [
"testing",
"macros",
"memory",
"json",
]
[[example]]
name = "custom_codec"
path = "examples/custom_codec.rs"
required-features = [
"macros",
"memory",
"json",
"cbor",
]
[[example]]
name = "failure_policy"
path = "examples/failure_policy.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "from_context"
path = "examples/from_context.rs"
required-features = [
"testing",
"macros",
"memory",
"json",
]
[[example]]
name = "http_outbox"
path = "examples/http_outbox.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "lifespan"
path = "examples/lifespan.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "logging"
path = "examples/logging.rs"
required-features = [
"macros",
"memory",
"json",
"logging",
]
[[example]]
name = "logging_middleware"
path = "examples/logging_middleware.rs"
required-features = [
"macros",
"memory",
"json",
"logging",
]
[[example]]
name = "macro_app"
path = "examples/macro_app.rs"
required-features = [
"macros",
"memory",
]
[[example]]
name = "manual_asyncapi_http"
path = "examples/manual/asyncapi_http.rs"
required-features = [
"memory",
"asyncapi",
]
[[example]]
name = "manual_codecs"
path = "examples/manual/codecs.rs"
required-features = [
"memory",
"json",
"cbor",
]
[[example]]
name = "manual_context"
path = "examples/manual/context.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_context_field"
path = "examples/manual/context_field.rs"
[[example]]
name = "manual_ctx_extractor"
path = "examples/manual/ctx_extractor.rs"
required-features = [
"testing",
"memory",
"json",
]
[[example]]
name = "manual_custom_codec"
path = "examples/manual/custom_codec.rs"
required-features = [
"memory",
"json",
"cbor",
]
[[example]]
name = "manual_failure_policy"
path = "examples/manual/failure_policy.rs"
[[example]]
name = "manual_from_context"
path = "examples/manual/from_context.rs"
required-features = [
"testing",
"memory",
"json",
]
[[example]]
name = "manual_http_outbox"
path = "examples/manual/http_outbox.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_lifespan"
path = "examples/manual/lifespan.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_logging_middleware"
path = "examples/manual/logging_middleware.rs"
required-features = [
"memory",
"json",
"logging",
]
[[example]]
name = "manual_metrics_http"
path = "examples/manual/metrics_http.rs"
required-features = [
"memory",
"metrics",
"json",
]
[[example]]
name = "manual_middleware"
path = "examples/manual/middleware.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_middleware_app_scope"
path = "examples/manual/middleware_app_scope.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_middleware_router_scope"
path = "examples/manual/middleware_router_scope.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_otel_export"
path = "examples/manual/otel_export.rs"
required-features = [
"otel",
"memory",
"json",
]
[[example]]
name = "manual_post_settle"
path = "examples/manual/post_settle.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_protobuf"
path = "examples/manual/protobuf.rs"
required-features = ["memory"]
[[example]]
name = "manual_publishing"
path = "examples/manual/publishing.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_quickstart"
path = "examples/manual/quickstart.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_retry"
path = "examples/manual/retry.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_routed_service_orders"
path = "examples/manual/routed_service_orders.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_routing"
path = "examples/manual/routing.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_seek"
path = "examples/manual/seek.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_subscribers"
path = "examples/manual/subscribers.rs"
required-features = [
"memory",
"json",
]
[[example]]
name = "manual_tutorial"
path = "examples/manual/tutorial/main.rs"
required-features = [
"memory",
"json",
"asyncapi",
]
[[example]]
name = "manual_tutorial_first_app"
path = "examples/manual/tutorial/first_app.rs"
required-features = [
"memory",
"json",
"asyncapi",
]
[[example]]
name = "manual_tutorial_reply_app"
path = "examples/manual/tutorial/reply_app.rs"
required-features = [
"memory",
"json",
"asyncapi",
]
[[example]]
name = "manual_typed_headers"
path = "examples/manual/typed_headers.rs"
required-features = [
"testing",
"memory",
"json",
"asyncapi",
]
[[example]]
name = "metrics_http"
path = "examples/metrics_http.rs"
required-features = [
"macros",
"memory",
"metrics",
"json",
]
[[example]]
name = "middleware"
path = "examples/middleware.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "middleware_app_scope"
path = "examples/middleware_app_scope.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "middleware_router_scope"
path = "examples/middleware_router_scope.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "otel_export"
path = "examples/otel_export.rs"
required-features = [
"otel",
"macros",
"memory",
"json",
]
[[example]]
name = "post_settle"
path = "examples/post_settle.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "protobuf"
path = "examples/protobuf.rs"
required-features = [
"macros",
"memory",
]
[[example]]
name = "publishing"
path = "examples/publishing.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "quickstart"
path = "examples/quickstart.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "retry"
path = "examples/retry.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "routed_service"
path = "examples/routed_service/main.rs"
required-features = [
"macros",
"memory",
"json",
"metrics",
"asyncapi",
"logging",
]
[[example]]
name = "routing"
path = "examples/routing.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "seek"
path = "examples/seek.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "subscribers"
path = "examples/subscribers.rs"
required-features = [
"macros",
"memory",
"json",
]
[[example]]
name = "testing"
path = "examples/testing.rs"
required-features = [
"testing",
"macros",
"memory",
"json",
]
[[example]]
name = "tutorial"
path = "examples/tutorial/main.rs"
required-features = [
"macros",
"memory",
"json",
"asyncapi",
]
[[example]]
name = "tutorial_first_app"
path = "examples/tutorial/first_app.rs"
required-features = [
"macros",
"memory",
"json",
"asyncapi",
]
[[example]]
name = "tutorial_reply_app"
path = "examples/tutorial/reply_app.rs"
required-features = [
"macros",
"memory",
"json",
"asyncapi",
]
[[example]]
name = "typed_headers"
path = "examples/typed_headers.rs"
required-features = [
"testing",
"macros",
"memory",
"json",
"asyncapi",
]
[[test]]
name = "app_cli_coverage"
path = "tests/app_cli_coverage.rs"
[[test]]
name = "app_dispatch"
path = "tests/app_dispatch.rs"
required-features = [
"memory",
"json",
]
[[test]]
name = "app_start"
path = "tests/app_start.rs"
[[test]]
name = "app_trait"
path = "tests/app_trait.rs"
[[test]]
name = "asyncapi"
path = "tests/asyncapi.rs"
required-features = [
"asyncapi",
"memory",
"macros",
]
[[test]]
name = "batch_reply_context"
path = "tests/batch_reply_context.rs"
[[test]]
name = "batch_router_coverage"
path = "tests/batch_router_coverage.rs"
[[test]]
name = "batch_seek"
path = "tests/batch_seek.rs"
[[test]]
name = "batch_subscriber"
path = "tests/batch_subscriber.rs"
required-features = [
"macros",
"memory",
"json",
"testing",
]
[[test]]
name = "batch_uniform_outcome"
path = "tests/batch_uniform_outcome.rs"
[[test]]
name = "codec_free_lanes"
path = "tests/codec_free_lanes.rs"
[[test]]
name = "codecs"
path = "tests/codecs.rs"
required-features = [
"macros",
"memory",
"cbor",
"msgpack",
]
[[test]]
name = "composition_rules"
path = "tests/composition_rules.rs"
required-features = [
"macros",
"memory",
"json",
"testing",
]
[[test]]
name = "conformance_self"
path = "tests/conformance_self.rs"
required-features = [
"conformance",
"memory",
]
[[test]]
name = "conformance_settlement"
path = "tests/conformance_settlement.rs"
[[test]]
name = "context_extensions"
path = "tests/context_extensions.rs"
[[test]]
name = "ctx_extractor"
path = "tests/ctx_extractor.rs"
required-features = [
"macros",
"memory",
"json",
"testing",
]
[[test]]
name = "doc_testing_memory"
path = "tests/doc_testing_memory.rs"
required-features = [
"memory",
"macros",
"json",
"testing",
]
[[test]]
name = "failure_policy"
path = "tests/failure_policy.rs"
required-features = [
"macros",
"memory",
"json",
]
[[test]]
name = "from_context"
path = "tests/from_context.rs"
required-features = [
"macros",
"memory",
"json",
"testing",
]
[[test]]
name = "health_probe"
path = "tests/health_probe.rs"
[[test]]
name = "lane_traits_without_macros"
path = "tests/lane_traits_without_macros.rs"
[[test]]
name = "lanes"
path = "tests/lanes.rs"
[[test]]
name = "macro_params"
path = "tests/macro_params.rs"
[[test]]
name = "macro_subscriber"
path = "tests/macro_subscriber.rs"
required-features = [
"macros",
"memory",
"json",
]
[[test]]
name = "manual_app_start"
path = "tests/manual_app_start.rs"
[[test]]
name = "manual_doc_testing_memory"
path = "tests/manual_doc_testing_memory.rs"
[[test]]
name = "manual_matrix"
path = "tests/manual_matrix.rs"
[[test]]
name = "manual_opentelemetry"
path = "tests/manual_opentelemetry.rs"
[[test]]
name = "manual_out_injection"
path = "tests/manual_out_injection.rs"
[[test]]
name = "manual_out_slots"
path = "tests/manual_out_slots.rs"
[[test]]
name = "manual_publish_options"
path = "tests/manual_publish_options.rs"
[[test]]
name = "manual_raw_subscriber"
path = "tests/manual_raw_subscriber.rs"
[[test]]
name = "manual_slot_capabilities"
path = "tests/manual_slot_capabilities.rs"
[[test]]
name = "manual_testing_harness"
path = "tests/manual_testing_harness.rs"
[[test]]
name = "memory_prelude"
path = "tests/memory_prelude.rs"
[[test]]
name = "metrics"
path = "tests/metrics.rs"
required-features = [
"metrics",
"memory",
"json",
]
[[test]]
name = "mount_site_publisher"
path = "tests/mount_site_publisher.rs"
[[test]]
name = "opentelemetry"
path = "tests/opentelemetry.rs"
[[test]]
name = "otel_metrics"
path = "tests/otel_metrics.rs"
[[test]]
name = "out_injection"
path = "tests/out_injection.rs"
[[test]]
name = "out_slots"
path = "tests/out_slots.rs"
[[test]]
name = "out_transforms"
path = "tests/out_transforms.rs"
[[test]]
name = "owned_transaction"
path = "tests/owned_transaction.rs"
[[test]]
name = "post_settle_hooks"
path = "tests/post_settle_hooks.rs"
[[test]]
name = "prelude"
path = "tests/prelude.rs"
[[test]]
name = "publish_builder"
path = "tests/publish_builder.rs"
[[test]]
name = "publish_context"
path = "tests/publish_context.rs"
[[test]]
name = "publish_coverage"
path = "tests/publish_coverage.rs"
[[test]]
name = "publish_options"
path = "tests/publish_options.rs"
[[test]]
name = "publish_policy"
path = "tests/publish_policy.rs"
[[test]]
name = "raw_subscriber"
path = "tests/raw_subscriber.rs"
[[test]]
name = "redirect"
path = "tests/redirect.rs"
[[test]]
name = "reply_destination"
path = "tests/reply_destination.rs"
[[test]]
name = "reply_message_pair"
path = "tests/reply_message_pair.rs"
[[test]]
name = "reply_wiring"
path = "tests/reply_wiring.rs"
[[test]]
name = "retry_declaration"
path = "tests/retry_declaration.rs"
[[test]]
name = "retry_redelivery"
path = "tests/retry_redelivery.rs"
[[test]]
name = "retry_semantics"
path = "tests/retry_semantics.rs"
required-features = [
"macros",
"memory",
"json",
]
[[test]]
name = "router_include"
path = "tests/router_include.rs"
required-features = [
"macros",
"memory",
"json",
]
[[test]]
name = "router_parity"
path = "tests/router_parity.rs"
[[test]]
name = "router_publishing"
path = "tests/router_publishing.rs"
required-features = [
"macros",
"memory",
"json",
]
[[test]]
name = "scope_codec"
path = "tests/scope_codec.rs"
required-features = [
"macros",
"memory",
"json",
]
[[test]]
name = "seek_api"
path = "tests/seek_api.rs"
required-features = [
"testing",
"macros",
"memory",
"json",
]
[[test]]
name = "self_serialising"
path = "tests/self_serialising.rs"
[[test]]
name = "startup_pairing"
path = "tests/startup_pairing.rs"
[[test]]
name = "subscriber_return_forms"
path = "tests/subscriber_return_forms.rs"
[[test]]
name = "subscriber_settings"
path = "tests/subscriber_settings.rs"
[[test]]
name = "testing_harness"
path = "tests/testing_harness.rs"
required-features = [
"testing",
"macros",
"memory",
"json",
]
[[test]]
name = "testing_harness_edges"
path = "tests/testing_harness_edges.rs"
[[test]]
name = "transaction_scope"
path = "tests/transaction_scope.rs"
[[test]]
name = "typed_headers"
path = "tests/typed_headers.rs"
[[test]]
name = "ui"
path = "tests/ui.rs"
required-features = [
"macros",
"memory",
"json",
]
[[test]]
name = "ui_codec_free"
path = "tests/ui_codec_free.rs"
[[test]]
name = "workers"
path = "tests/workers.rs"
required-features = [
"macros",
"memory",
"json",
]
[dependencies.anyhow]
version = "1.0.1"
optional = true
[dependencies.bytes]
version = "1"
[dependencies.ciborium]
version = "0.2.1"
optional = true
[dependencies.clap]
version = "4"
features = ["derive"]
optional = true
[dependencies.futures]
version = "0.3"
[dependencies.inventory]
version = "0.3.5"
optional = true
[dependencies.opentelemetry]
version = "0.32"
features = [
"trace",
"metrics",
]
optional = true
default-features = false
[dependencies.opentelemetry-otlp]
version = "0.32"
features = [
"grpc-tonic",
"trace",
"metrics",
]
optional = true
default-features = false
[dependencies.opentelemetry_sdk]
version = "0.32"
features = [
"trace",
"metrics",
"rt-tokio",
]
optional = true
default-features = false
[dependencies.prometheus]
version = "0.14"
optional = true
default-features = false
[dependencies.rmp-serde]
version = "1"
optional = true
[dependencies.ruststream-macros]
version = "=0.7.0-rc.6"
optional = true
[dependencies.schemars]
version = "1"
optional = true
[dependencies.serde]
version = "1.0.69"
features = ["derive"]
[dependencies.serde_json]
version = "1"
optional = true
[dependencies.serde_norway]
version = "0.9"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1.37"
features = [
"rt-multi-thread",
"macros",
"sync",
"time",
"signal",
]
[dependencies.tokio-util]
version = "0.7.10"
features = ["rt"]
[dependencies.tracing]
version = "0.1.29"
[dependencies.tracing-opentelemetry]
version = "0.33"
optional = true
[dependencies.tracing-subscriber]
version = "0.3.22"
features = ["env-filter"]
optional = true
[dev-dependencies.axum]
version = "0.8"
[dev-dependencies.opentelemetry]
version = "0.32"
features = [
"trace",
"metrics",
]
default-features = false
[dev-dependencies.opentelemetry_sdk]
version = "0.32"
features = [
"trace",
"metrics",
"rt-tokio",
"testing",
]
default-features = false
[dev-dependencies.prost]
version = "0.14"
[dev-dependencies.schemars]
version = "1"
[dev-dependencies.serde]
version = "1"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
"sync",
"time",
"net",
"test-util",
]
[dev-dependencies.trybuild]
version = "1"
[lints.clippy]
missing_const_for_fn = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
redundant_pub_crate = "allow"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.correctness]
level = "deny"
priority = -1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.clippy.perf]
level = "deny"
priority = -1
[lints.clippy.suspicious]
level = "deny"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "deny"
unreachable_pub = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused_qualifications = "warn"