Open thomaseizinger opened 1 year ago
Might it be possible to get rid of the async-std
(optional) dependency? I'd guess the ecosystem has moved on to tokio
these days, with the last commit in async-std
being 9 months ago: https://github.com/async-rs/async-std/commit/bf316b095c176c8738c6401cc62d0bc389c88961.
I think this could help cutting down some more dependencies as well.
I am not following the async-std development but I'd consider that one too established to remove.
Plus, it is optional as you said. I think it would be more fruitful to investigate for dependencies in our protocol crates like yamux, gossipsub or kademlia.
Might it be possible to get rid of the
async-std
(optional) dependency? I'd guess the ecosystem has moved on totokio
these days, with the last commit inasync-std
being 9 months ago: async-rs/async-std@bf316b0.I think this could help cutting down some more dependencies as well.
We can cut down some dependencies by moving all our tests and examples to tokio. async-std
is heavily feature-flagged, meaning we can reduce our dependencies by only activating the bare minimum features needed in the various transports and libp2p-swarm
.
I'll record various efforts in here to reduce the size of our dependency tree where possible.
More suggestions welcome, a good place to start is a timings report by cargo of the entire workspace (minus dev-dependencies):
cargo build --workspace --all-features --timings
. Once you have identified a (ideally heavy) dependency that we might not need, investigate withcargo tree -i -p <dependency>
where it comes from.