ubiquity_transport/
lib.rs

1//! Transport abstraction for WASM and native
2//! 
3//! This crate provides a unified transport layer that works across:
4//! - Native environments (Unix sockets, TCP)
5//! - Web browsers (MessageChannel, BroadcastChannel)
6//! - Edge workers (WebSocket)
7//! 
8//! The transport abstraction enables the consciousness mesh to run
9//! seamlessly in any environment.
10
11
12pub mod traits;
13pub mod factory;
14
15#[cfg(feature = "native")]
16pub mod native;
17
18#[cfg(feature = "websocket")]
19pub mod websocket;
20
21#[cfg(all(target_arch = "wasm32", feature = "wasm"))]
22pub mod wasm;
23
24// Re-export core traits
25pub use traits::{Transport, Connection, Listener};
26
27// Re-export factory types
28pub use factory::{
29    TransportFactory, 
30    TransportType, 
31    TransportBuilder,
32    TransportConfig,
33};
34
35/// Prelude for common imports
36pub mod prelude {
37    pub use crate::traits::{Transport, Connection, Listener};
38    pub use crate::factory::{TransportFactory, TransportType, TransportBuilder};
39}