tarscoding545's recent timeline updates
tarscoding545

tarscoding545

V2EX member #252070, joined on 2017-09-02 10:14:39 +08:00
tarscoding545's recent replies
Apr 13, 2025
Replied to a topic by tarscoding545 程序员 rust 版本 libp2p 的长相不太行
全局使用的 tokio 运行时,但是框架很多库对 tokio 的支持层级不太统一,主要是 quic 协议这块,不过其他协议也有类似的问题给老哥们看下目前几个协议 tokio 特性的配置:
libp2p = { version = "0.55.0", features = [
"quic",
"gossipsub",
"tls",
"kad",
"ping",
"tcp",
"yamux",
"noise",
"macros",
"mdns",
], default-features = false }


libp2p-mdns = { version = "0.47.0", features = ["tokio"] }
libp2p-tcp = { version = "0.43.0", features = ["tokio"] }
libp2p-quic = { version = "0.12.0", features = ["tokio"]}
libp2p-swarm = { version = "0.46.0", features = ["tokio"] }
tokio = { version = "1.44.2", features = ["full"] },有不合理的地方老哥们指摘.
Apr 13, 2025
Replied to a topic by tarscoding545 程序员 rust 版本 libp2p 的长相不太行
老哥们,改了:
pub fn create_swarm(
peer_id: PeerId,
transport: Boxed<(PeerId, StreamMuxerBox)>
) -> Result<Swarm<SwarmBehaviour>> {
let behavior = Behaviour::new(&peer_id)?;
let config = Config::with_tokio_executor();
let swarm = Swarm::new(transport, behavior, peer_id, config);
Ok(swarm)
}
Apr 2, 2025
Replied to a topic by tarscoding545 程序员 rust 版本 libp2p 的长相不太行
QUIC 和 TCP 的俩 map 是真难看啊
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2640 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 11:09 · PVG 19:09 · LAX 04:09 · JFK 07:09
♥ Do have faith in what you're doing.