3 ms·
Go has all of that code in its runtime. Rust does not. Hence, you need to get that code somehow, and packages are how you do that. Your lock file should ensure
by steveklabnik 7y ago
Go has all of that code in its runtime. Rust does not. Hence, you need to get that code somehow, and packages are how you do that.
Your lock file should ensure that the exact same versions of everything are used a year from now. So it should work with no hell. That being said, with async/await five weeks away, the ecosystem is about to get a massive upgrade, and so you will be behind unless you built this all with the pre-release versions of stuff. That said, unless you’re doing active development on the project, that shouldn’t matter, and if you are, you can schedule some time to do the upgrade, like anything else.
- s_c_r 7y agoOh good point about the lock file, hadn't thought about that. Will there be a compelling reason to rewrite stuff using async/await? I get that it will be the right way going forward but curious about the benefits for legacy stuff.
- steveklabnik 7y agoAsync/await makes code much nicer. For an example (though this post is old and so is a bit out of date) see here: http://aturon.github.io/tech/2018/04/24/async-borrowing/ http://aturon.github.io/tech/2018/04/24/async-borrowing/ That said, async/await produces stuff that implements std::future::Future. The existing async ecosystem was built around the futures crate. Once std future hits stable in the next release, the Futures crate will release a 0.3 version, which has compatibility stuff between the new futures and futures 0.1, so you can technically bridge between the two worlds. The benefit is basically "you won't make your users use a bridge between your code and the new stuff".
- s_c_r 7y agoThanks for the link! The async/await code is definitely easier to parse mentally. Look forward to the release.