fx-torrent 0.10.3

FX Torrent is a feature rich Bittorrent protocol implementation written in rust supporting Linux, MacOS and Windows.
Documentation
/// Create a new channel for sending and receiving messages between torrent tasks.
///
/// This macro supports:
/// - `channel!()` for a bounded (backpressure) channel with default capacity `256`.
/// - `channel!(N)` for a bounded (backpressure) channel with capacity `N`.
macro_rules! channel {
    () => {{
        channel!(256)
    }};
    ($limit:expr) => {{
        let limit: usize = $limit;
        crate::channel::channel(limit)
    }};
}

/// Spawn a (conditionally) instrumented tokio task.
///
/// # Example Usage
///
/// ```rust,compile_fail
/// spawn!("Struct::fn", async {})
/// ```
macro_rules! spawn {
    ($name:expr, $future:expr) => {{
        let future = $future;

        #[cfg(feature = "tracing")]
        let future = {
            use tracing::Instrument;
            future.instrument(tracing::info_span!($name))
        };

        tokio::spawn(future)
    }};
}