[package]
edition = "2024"
rust-version = "1.91"
name = "magnetar-driver"
version = "1.7.1"
authors = ["Florentin Dubois <florentin.dubois@clever-cloud.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Apache Pulsar client driver for Rust. Public façade — re-exports the sans-io core plus the selected runtime engine. Imported as `magnetar`."
homepage = "https://github.com/CleverCloud/magnetar"
readme = "README.md"
keywords = [
"pulsar",
"apache-pulsar",
"messaging",
"streaming",
"sans-io",
]
categories = [
"asynchronous",
"network-programming",
]
license = "Apache-2.0"
repository = "https://github.com/CleverCloud/magnetar"
[features]
admin = ["dep:magnetar-admin"]
auth-athenz = ["dep:magnetar-auth-athenz"]
auth-athenz-zts = [
"auth-athenz",
"magnetar-auth-athenz/zts",
]
auth-oauth2 = ["dep:magnetar-auth-oauth2"]
auth-sasl = ["dep:magnetar-auth-sasl"]
auth-sasl-kerberos = [
"auth-sasl",
"magnetar-auth-sasl/kerberos",
]
buggify = [
"magnetar-proto/buggify",
"magnetar-runtime-tokio?/buggify",
"magnetar-runtime-moonpool?/buggify",
]
crypto-aws-lc-rs = [
"magnetar-runtime-tokio?/crypto-aws-lc-rs",
"magnetar-runtime-moonpool?/crypto-aws-lc-rs",
"magnetar-auth-athenz?/crypto-aws-lc-rs",
"magnetar-admin?/crypto-aws-lc-rs",
"magnetar-auth-oauth2?/crypto-aws-lc-rs",
]
crypto-fips = [
"magnetar-runtime-tokio?/crypto-fips",
"magnetar-runtime-moonpool?/crypto-fips",
"magnetar-auth-athenz?/crypto-fips",
"magnetar-admin?/crypto-fips",
"magnetar-auth-oauth2?/crypto-fips",
]
crypto-openssl = [
"magnetar-runtime-tokio?/crypto-openssl",
"magnetar-runtime-moonpool?/crypto-openssl",
"magnetar-auth-athenz?/crypto-openssl",
"magnetar-admin?/crypto-openssl",
"magnetar-auth-oauth2?/crypto-openssl",
]
crypto-ring = [
"magnetar-runtime-tokio?/crypto-ring",
"magnetar-runtime-moonpool?/crypto-ring",
"magnetar-auth-athenz?/crypto-ring",
"magnetar-admin?/crypto-ring",
"magnetar-auth-oauth2?/crypto-ring",
]
default = [
"tokio",
"crypto-aws-lc-rs",
]
encryption = ["dep:magnetar-messagecrypto"]
experimental-v5-client = ["tokio"]
moonpool = [
"tokio",
"dep:magnetar-runtime-moonpool",
"dep:moonpool-core",
]
opentelemetry = ["dep:opentelemetry"]
scalable-topics = [
"magnetar-proto/scalable-topics",
"magnetar-runtime-tokio?/scalable-topics",
"magnetar-runtime-moonpool?/scalable-topics",
"magnetar-admin?/scalable-topics",
]
tokio = [
"dep:magnetar-runtime-tokio",
"dep:tokio",
"dep:futures-util",
]
[lib]
name = "magnetar"
path = "src/lib.rs"
[[test]]
name = "builder_encryption_guardrail"
path = "tests/builder_encryption_guardrail.rs"
[[test]]
name = "chunk_bound_builder_surface"
path = "tests/chunk_bound_builder_surface.rs"
[[test]]
name = "consumer_name_builder_surface"
path = "tests/consumer_name_builder_surface.rs"
[[test]]
name = "e2e_ack_orphan_unload"
path = "tests/e2e_ack_orphan_unload.rs"
[[test]]
name = "e2e_admin_verbs"
path = "tests/e2e_admin_verbs.rs"
[[test]]
name = "e2e_aggregate_stats"
path = "tests/e2e_aggregate_stats.rs"
[[test]]
name = "e2e_athenz_zts"
path = "tests/e2e_athenz_zts.rs"
[[test]]
name = "e2e_batch_ack_timeout_shared"
path = "tests/e2e_batch_ack_timeout_shared.rs"
[[test]]
name = "e2e_batch_chunk"
path = "tests/e2e_batch_chunk.rs"
[[test]]
name = "e2e_cluster_failover"
path = "tests/e2e_cluster_failover.rs"
[[test]]
name = "e2e_compacted"
path = "tests/e2e_compacted.rs"
[[test]]
name = "e2e_connect_resilience"
path = "tests/e2e_connect_resilience.rs"
[[test]]
name = "e2e_connections_per_broker"
path = "tests/e2e_connections_per_broker.rs"
[[test]]
name = "e2e_consumer_drop"
path = "tests/e2e_consumer_drop.rs"
[[test]]
name = "e2e_consumer_event_listener"
path = "tests/e2e_consumer_event_listener.rs"
[[test]]
name = "e2e_crypto"
path = "tests/e2e_crypto.rs"
[[test]]
name = "e2e_cumulative_batch_ack_prune"
path = "tests/e2e_cumulative_batch_ack_prune.rs"
[[test]]
name = "e2e_dlq"
path = "tests/e2e_dlq.rs"
[[test]]
name = "e2e_dns_resolver"
path = "tests/e2e_dns_resolver.rs"
[[test]]
name = "e2e_driver_mid_session_reject"
path = "tests/e2e_driver_mid_session_reject.rs"
[[test]]
name = "e2e_force_unsubscribe"
path = "tests/e2e_force_unsubscribe.rs"
[[test]]
name = "e2e_handshake_error"
path = "tests/e2e_handshake_error.rs"
[[test]]
name = "e2e_interceptors_ack"
path = "tests/e2e_interceptors_ack.rs"
[[test]]
name = "e2e_keepalive_watchdog"
path = "tests/e2e_keepalive_watchdog.rs"
[[test]]
name = "e2e_logging"
path = "tests/e2e_logging.rs"
[[test]]
name = "e2e_lookup_direct_multi_broker"
path = "tests/e2e_lookup_direct_multi_broker.rs"
[[test]]
name = "e2e_lookup_drop_unregister"
path = "tests/e2e_lookup_drop_unregister.rs"
[[test]]
name = "e2e_lookup_redirect_chain"
path = "tests/e2e_lookup_redirect_chain.rs"
[[test]]
name = "e2e_memory_limit"
path = "tests/e2e_memory_limit.rs"
[[test]]
name = "e2e_message_listener"
path = "tests/e2e_message_listener.rs"
[[test]]
name = "e2e_moonpool_direct_broker_authority"
path = "tests/e2e_moonpool_direct_broker_authority.rs"
[[test]]
name = "e2e_nack_unacked_removal"
path = "tests/e2e_nack_unacked_removal.rs"
[[test]]
name = "e2e_oauth2"
path = "tests/e2e_oauth2.rs"
[[test]]
name = "e2e_otel_context_propagation"
path = "tests/e2e_otel_context_propagation.rs"
[[test]]
name = "e2e_partition_fast_path"
path = "tests/e2e_partition_fast_path.rs"
[[test]]
name = "e2e_partitioned_deep"
path = "tests/e2e_partitioned_deep.rs"
[[test]]
name = "e2e_pattern_auto_reconcile"
path = "tests/e2e_pattern_auto_reconcile.rs"
[[test]]
name = "e2e_persistence"
path = "tests/e2e_persistence.rs"
[[test]]
name = "e2e_probe_corrupted_scheme"
path = "tests/e2e_probe_corrupted_scheme.rs"
[[test]]
name = "e2e_probe_portless_ipv6"
path = "tests/e2e_probe_portless_ipv6.rs"
[[test]]
name = "e2e_producer_drop"
path = "tests/e2e_producer_drop.rs"
[[test]]
name = "e2e_producer_open_cancel"
path = "tests/e2e_producer_open_cancel.rs"
[[test]]
name = "e2e_pulsar"
path = "tests/e2e_pulsar.rs"
[[test]]
name = "e2e_pulsar_proxy"
path = "tests/e2e_pulsar_proxy.rs"
[[test]]
name = "e2e_pulsar_v5"
path = "tests/e2e_pulsar_v5.rs"
[[test]]
name = "e2e_receiver_queue_policy"
path = "tests/e2e_receiver_queue_policy.rs"
[[test]]
name = "e2e_reconnect"
path = "tests/e2e_reconnect.rs"
[[test]]
name = "e2e_reconnect_safety"
path = "tests/e2e_reconnect_safety.rs"
[[test]]
name = "e2e_replicated_subscriptions"
path = "tests/e2e_replicated_subscriptions.rs"
[[test]]
name = "e2e_rolling_stats"
path = "tests/e2e_rolling_stats.rs"
[[test]]
name = "e2e_sasl_kerberos"
path = "tests/e2e_sasl_kerberos.rs"
[[test]]
name = "e2e_scalable_topic"
path = "tests/e2e_scalable_topic.rs"
[[test]]
name = "e2e_schemas"
path = "tests/e2e_schemas.rs"
[[test]]
name = "e2e_schemas_extended"
path = "tests/e2e_schemas_extended.rs"
[[test]]
name = "e2e_seek_per_partition"
path = "tests/e2e_seek_per_partition.rs"
[[test]]
name = "e2e_send_timeout"
path = "tests/e2e_send_timeout.rs"
[[test]]
name = "e2e_shadow_topic"
path = "tests/e2e_shadow_topic.rs"
[[test]]
name = "e2e_shadow_topic_replicator"
path = "tests/e2e_shadow_topic_replicator.rs"
[[test]]
name = "e2e_shared_subscription_churn"
path = "tests/e2e_shared_subscription_churn.rs"
[[test]]
name = "e2e_sub_types"
path = "tests/e2e_sub_types.rs"
[[test]]
name = "e2e_sub_types_v5"
path = "tests/e2e_sub_types_v5.rs"
[[test]]
name = "e2e_terminal_exit"
path = "tests/e2e_terminal_exit.rs"
[[test]]
name = "e2e_transactions"
path = "tests/e2e_transactions.rs"
[[test]]
name = "e2e_vectored_writes"
path = "tests/e2e_vectored_writes.rs"
[[test]]
name = "e2e_wrapper_message_listener"
path = "tests/e2e_wrapper_message_listener.rs"
[[test]]
name = "message_listener_builder_surface"
path = "tests/message_listener_builder_surface.rs"
[[test]]
name = "v5_builder_defaults"
path = "tests/v5_builder_defaults.rs"
[[test]]
name = "v5_builder_defaults_moonpool"
path = "tests/v5_builder_defaults_moonpool.rs"
[[test]]
name = "v5_client_v4_escape_hatch"
path = "tests/v5_client_v4_escape_hatch.rs"
[[test]]
name = "v5_client_v4_escape_hatch_moonpool"
path = "tests/v5_client_v4_escape_hatch_moonpool.rs"
[[test]]
name = "v5_producer_mapping"
path = "tests/v5_producer_mapping.rs"
[[test]]
name = "v5_producer_mapping_moonpool"
path = "tests/v5_producer_mapping_moonpool.rs"
[[test]]
name = "v5_queue_consumer_mapping"
path = "tests/v5_queue_consumer_mapping.rs"
[[test]]
name = "v5_queue_consumer_mapping_moonpool"
path = "tests/v5_queue_consumer_mapping_moonpool.rs"
[[test]]
name = "v5_stream_consumer_mapping"
path = "tests/v5_stream_consumer_mapping.rs"
[[test]]
name = "v5_stream_consumer_mapping_moonpool"
path = "tests/v5_stream_consumer_mapping_moonpool.rs"
[dependencies.bytes]
version = "^1.12.1"
[dependencies.futures-util]
version = "^0.3.34"
features = [
"std",
"async-await",
]
optional = true
default-features = false
[dependencies.hdrhistogram]
version = "^7.6.0"
default-features = false
[dependencies.magnetar-admin]
version = "^1.7.1"
optional = true
[dependencies.magnetar-auth-athenz]
version = "^1.7.1"
optional = true
[dependencies.magnetar-auth-oauth2]
version = "^1.7.1"
optional = true
[dependencies.magnetar-auth-sasl]
version = "^1.7.1"
optional = true
[dependencies.magnetar-messagecrypto]
version = "^1.7.1"
optional = true
[dependencies.magnetar-proto]
version = "^1.7.1"
[dependencies.magnetar-runtime-moonpool]
version = "^1.7.1"
optional = true
[dependencies.magnetar-runtime-tokio]
version = "^1.7.1"
optional = true
[dependencies.moonpool-core]
version = "^0.8.0"
optional = true
[dependencies.opentelemetry]
version = "^0.32.0"
features = ["trace"]
optional = true
default-features = false
[dependencies.parking_lot]
version = "^0.12.5"
[dependencies.thiserror]
version = "^2.0.20"
[dependencies.tokio]
version = "^1.53.1"
features = [
"rt",
"sync",
"test-util",
]
optional = true
default-features = false
[dependencies.tracing]
version = "^0.1.44"
[dependencies.url]
version = "^2.5.8"
[dependencies.uuid]
version = "^1.24.1"
features = [
"v4",
"fast-rng",
"std",
]
default-features = false
[dev-dependencies.aws-lc-rs]
version = "^1.18.0"
features = ["aws-lc-sys"]
default-features = false
[dev-dependencies.base64]
version = "^0.23.1"
features = ["std"]
default-features = false
[dev-dependencies.magnetar-admin]
version = "^1.7.1"
[dev-dependencies.magnetar-fakes]
version = "^1.7.1"
[dev-dependencies.opentelemetry]
version = "^0.32.0"
features = ["trace"]
default-features = false
[dev-dependencies.opentelemetry_sdk]
version = "^0.32.1"
features = ["trace"]
default-features = false
[dev-dependencies.reqwest]
version = "^0.13.4"
features = [
"json",
"form",
"multipart",
]
default-features = false
[dev-dependencies.schemars]
version = "^1.2.2"
features = [
"derive",
"std",
]
default-features = false
[dev-dependencies.serde]
version = "^1.0.229"
features = ["derive"]
[dev-dependencies.serde_json]
version = "^1.0.151"
[dev-dependencies.testcontainers]
version = "^0.28.0"
[dev-dependencies.tokio]
version = "^1.53.1"
features = [
"rt-multi-thread",
"macros",
"time",
"test-util",
]
default-features = false
[dev-dependencies.tracing-subscriber]
version = "^0.3.23"
features = [
"fmt",
"env-filter",
]
default-features = false
[dev-dependencies.wiremock]
version = "^0.6.5"
[lints.clippy]
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_sign_loss = "allow"
collapsible_if = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
unnecessary_literal_bound = "allow"
[lints.clippy.all]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
unreachable_pub = "warn"
unsafe_code = "forbid"
[lints.rust.rust_2024_compatibility]
level = "warn"
priority = -1