Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libp2p/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ mod phase;
mod select_muxer;
mod select_security;

#[cfg(all(not(target_arch = "wasm32"), feature = "websocket"))]
pub use phase::WebsocketError;
pub use phase::{BehaviourError, TransportError};

/// Build a [`Swarm`](libp2p_swarm::Swarm) by combining an identity, a set of
/// [`Transport`](libp2p_core::Transport)s and a
/// [`NetworkBehaviour`](libp2p_swarm::NetworkBehaviour).
Expand Down
5 changes: 5 additions & 0 deletions libp2p/src/builder/phase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ use swarm::*;
use tcp::*;
use websocket::*;

pub use behaviour::BehaviourError;
pub use other_transport::TransportError;
#[cfg(all(not(target_arch = "wasm32"), feature = "websocket"))]
pub use websocket::WebsocketError;

use super::{
select_muxer::SelectMuxerUpgrade, select_security::SelectSecurityUpgrade, SwarmBuilder,
};
Expand Down
7 changes: 6 additions & 1 deletion libp2p/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,17 @@ pub mod bandwidth;
#[cfg(doc)]
pub mod tutorials;

#[cfg(all(not(target_arch = "wasm32"), feature = "websocket"))]
pub use builder::WebsocketError as WebsocketBuilderError;
pub use libp2p_identity as identity;
pub use libp2p_identity::PeerId;
pub use libp2p_swarm::{Stream, StreamProtocol};

pub use self::{
builder::SwarmBuilder,
builder::{
BehaviourError as BehaviourBuilderError, SwarmBuilder,
TransportError as TransportBuilderError,
},
core::{
transport::TransportError,
upgrade::{InboundUpgrade, OutboundUpgrade},
Expand Down
Loading