Live data from Hacker News

Futures Is Stable on Rust 1.36

github.com

1–10 of 21 posts

Re: Futures Is Stable on Rust 1.36

#4
How is the cost in terms of binary size nowadays? Last time I checked using Futures meant adding roughly 5MB to the binary. To me at least that is unacceptable, so I just rolled my own stuff on top of rayon's thread pools.

Re: Futures Is Stable on Rust 1.36

#6
post #4

How is the cost in terms of binary size nowadays? Last time I checked using Futures meant adding roughly 5MB to the binary. To me at least that is unacceptable, so I just rolled my own stuff on top of rayon's thread pools.

Where does the bloat come from? Which features are offered by the standard futures that you left out in your implementation?

Re: Futures Is Stable on Rust 1.36

#7
post #2

This should solve a major bottleneck for anyone doing network related applications. For now, you have to use an unstable API or a one that is deprecated.

0.2 was deprecated.

0.1 was not, there's a lot of good and reliable software that's been built on 0.1, and there are some backward compatible shims for std::future to futures 0.1.

Re: Futures Is Stable on Rust 1.36

#8
post #4

How is the cost in terms of binary size nowadays? Last time I checked using Futures meant adding roughly 5MB to the binary. To me at least that is unacceptable, so I just rolled my own stuff on top of rayon's thread pools.

You're probably thinking of the Tokio library in regards to the size, though I can't right now validate the size.

Futures themselves are very lightweight.

Re: Futures Is Stable on Rust 1.36

#10
post #4

How is the cost in terms of binary size nowadays? Last time I checked using Futures meant adding roughly 5MB to the binary. To me at least that is unacceptable, so I just rolled my own stuff on top of rayon's thread pools.

You're probably thinking of the Tokio library in regards to the size, though I can't right now validate the size. Futures themselves are very lightweight.

Ah, yes, that was probably it. I stopped looking into Rust's Futures pretty much as soon as I noticed how heavyweight the required runtime is, which seemed ridiculous to me, since Futures are so simple conceptually. I have to look into this again.

In general, Rust's big binaries are one of the things that puts me off the most. Even dynamic linking often doesn't help much. Then again, if a few MB, which is a rounding error nowadays, is among the worst I can think of, that's actually pretty amazing ;).

Post reply on HN