- Raise MSRV to 1.88.0. See PR 6273.
- Fix
NetworkBehaviourderive macro: replace theResultwithstd::result::Result. See PR 4568
- Implement refactored
Transport. See PR 4568
-
Generate code for
libp2p-swarm'sFromSwarm::NewExternalAddrOfPeerenum variant. See PR 4371. -
Restore support for generic constraints on behaviours combined with
out_eventgenerated byNetworkBehaviourwhere no where clause is used. See PR 5003.
- Always forward all variants of
FromSwarm. See PR 4825.
- Adapt to interface changes in
libp2p-swarm. See PR 4706. - Remove supported for deprecated
#[behaviour(out_event = "...")]. To same functionality is available using#[behaviour(to_swarm = "...")]See PR 4737.
-
Fix
NetworkBehaviourDerive macro for generic types whenout_eventwas not provided. Previously the enum generated didn't have theNetworkBehaviourimpl constraints whilst using the generics for<Generic>::OutEvent. See PR 3393. -
Replace
NetworkBehaviourDerive macro deprecatedinject_*method implementations with the newon_swarm_eventandon_connection_handler_event. See PR 3011 and PR 3264.
-
Add
preludeconfiguration option. The derive-macro generates code that needs to refer to various symbols. See PR 3055. -
Update
rust-versionto reflect the actual MSRV: 1.60.0. See PR 3090.
- Fix an issue where the derive would generate bad code if the type parameters between the behaviour and a custom out event differed. See PR 2907.
- Fix an issue where the derive would generate incorrect code depending on available imports. See PR 2921.
-
Remove support for removed
NetworkBehaviourEventProcess. See PR 2840. -
Remove support for custom
pollmethod onNetworkBehaviourvia#[behaviour(poll_method = "poll")]. See PR 2841.
- Remove support for non-
NetworkBehaviourfields on mainstructvia#[behaviour(ignore)]. See PR 2842.
- Generate
NetworkBehaviour::OutEventif not provided through#[behaviour(out_event = "MyOutEvent")]and event processing is disabled (default).
- Import
ListenerIdfromlibp2p::core::transport. See PR 2652.
- Replace references of Protocol Handler with Connection Handler. See PR 2640.
- Allow mixing of ignored fields. See PR 2570.
- Adjust to latest changes in
libp2p-swarm.
-
Remove unnecessary clone of error in
inject_dial_failure(see PR 2349). -
Migrate to Rust edition 2021 (see PR 2339).
- Adjust to advanced dialing requests API changes (see PR 2317).
-
Update to latest
libp2p-swarmchanges (see PR 2191). -
Make
event_process = falsethe default.
- Handle
NetworkBehaviourAction::CloseConnection. See PR 2110 for details.
- Extend
NetworkBehaviourcallbacks, more concretely introducing newfn inject_new_listenerandfn inject_expired_external_addrand havefn inject_{new,expired}_listen_addrprovide aListenerIdPR 2011.
- Rename the crate to
libp2p-swarm-derive.
- Update for compatibility with
libp2p-swarm-0.25.
- Generate fully-qualified method name for
pollto avoid ambiguity. PR 1681.
- Allow users to opt out of the
NetworkBehaviourEventProcessmechanism through#[behaviour(event_process = false)]. This is useful if users want to process all events while polling the swarm throughSwarmEvent::Behaviour.