medi-rs 2.2.0

A lightweight async mediator library for Rust with dependency injection and derive macros
Documentation
# 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"
name = "medi-rs"
version = "2.2.0"
build = false
exclude = [
    "/.github",
    "/.vscode",
    "/.devcontainer",
    "/docs/work",
    "/target",
    "/tmp",
    "/lcov.info",
    "/*.profraw",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A lightweight async mediator library for Rust with dependency injection and derive macros"
homepage = "https://github.com/klab365/medi-rs"
readme = "Readme.md"
keywords = [
    "mediator",
    "cqrs",
    "events",
    "async",
    "di",
]
categories = [
    "asynchronous",
    "rust-patterns",
]
license = "MIT"
repository = "https://github.com/klab365/medi-rs"

[features]
default = []
embassy = [
    "dep:embassy-executor",
    "dep:embassy-sync",
    "medi-rs-macros/embassy",
]
std = ["futures/std"]
tokio = [
    "std",
    "dep:tokio",
    "medi-rs-macros/tokio",
]
wasm = [
    "std",
    "futures/alloc",
    "dep:wasm-bindgen-futures",
    "medi-rs-macros/wasm",
]

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

[[test]]
name = "01_test_ping_pong_request_response"
path = "tests/01_test_ping_pong_request_response.rs"

[[test]]
name = "02_test_duration_request_response"
path = "tests/02_test_duration_request_response.rs"

[[test]]
name = "03_test_request_with_resource"
path = "tests/03_test_request_with_resource.rs"

[[test]]
name = "04_test_dependency_injection"
path = "tests/04_test_dependency_injection.rs"

[[test]]
name = "05_test_error_handling"
path = "tests/05_test_error_handling.rs"

[[test]]
name = "06_test_bus_as_resource"
path = "tests/06_test_bus_as_resource.rs"

[[test]]
name = "07_test_event"
path = "tests/07_test_event.rs"

[[test]]
name = "08_test_async_dependency"
path = "tests/08_test_async_dependency.rs"

[[test]]
name = "09_test_command_return_types"
path = "tests/09_test_command_return_types.rs"

[[test]]
name = "10_test_generated_mediator"
path = "tests/10_test_generated_mediator.rs"

[[test]]
name = "11_test_module_composition"
path = "tests/11_test_module_composition.rs"

[[test]]
name = "12_test_macro_diagnostics"
path = "tests/12_test_macro_diagnostics.rs"

[[test]]
name = "13_test_static_command_metadata"
path = "tests/13_test_static_command_metadata.rs"

[[test]]
name = "14_test_embassy_event_dispatch"
path = "tests/14_test_embassy_event_dispatch.rs"

[[test]]
name = "15_test_private_handler"
path = "tests/15_test_private_handler.rs"

[[test]]
name = "16_test_handler_decorators"
path = "tests/16_test_handler_decorators.rs"

[[test]]
name = "17_test_runtime_tasks"
path = "tests/17_test_runtime_tasks.rs"

[[test]]
name = "18_test_event_edge_cases"
path = "tests/18_test_event_edge_cases.rs"

[[test]]
name = "19_test_event_decorators"
path = "tests/19_test_event_decorators.rs"

[[test]]
name = "20_test_dispatch_edge_cases"
path = "tests/20_test_dispatch_edge_cases.rs"

[[test]]
name = "21_test_task_event_dispatch"
path = "tests/21_test_task_event_dispatch.rs"

[[test]]
name = "22_test_shutdown"
path = "tests/22_test_shutdown.rs"

[dependencies.embassy-executor]
version = "0.10"
optional = true
default-features = false

[dependencies.embassy-sync]
version = "0.8"
optional = true

[dependencies.futures]
version = "0.3.31"
default-features = false

[dependencies.medi-rs-macros]
version = "2.1.0"

[dependencies.tokio]
version = "1.40.0"
features = [
    "macros",
    "rt-multi-thread",
    "sync",
    "time",
]
optional = true

[dependencies.wasm-bindgen-futures]
version = "0.4.45"
optional = true

[dev-dependencies.anyhow]
version = "1.0.98"

[dev-dependencies.async-trait]
version = "0.1.88"

[dev-dependencies.critical-section]
version = "1.2"
features = ["std"]

[dev-dependencies.embassy-executor]
version = "0.10"
features = [
    "platform-std",
    "executor-thread",
]

[dev-dependencies.futures]
version = "0.3.31"
features = ["executor"]

[dev-dependencies.rand]
version = "0.8.5"

[dev-dependencies.thiserror]
version = "1.0.64"

[dev-dependencies.tokio]
version = "1.40.0"
features = [
    "macros",
    "rt-multi-thread",
    "sync",
    "time",
]

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

[lints.clippy]
dbg_macro = "warn"
todo = "warn"
unimplemented = "warn"

[lints.rust]
unsafe_code = "forbid"