In Defense of Async: Function Colors Are Rusty
My complaint about the async rust world isn&#x27;t so much function coloring, but dependency craziness.<p>For instance, the postgres driver for rust (which is an excellent driver, by the way), is built in on async primitives. That&#x27;s a good thing, because it means that it can be used effectively from async code.<p>Unfortunately, a &quot;hello world&quot; program that uses the client takes 38s to build and downloads 65 dependencies, many of which are at 0.x.y versions and I have no idea what they do (parking_lot_core v0.8.5? slab v0.4.5?).<p>This is not just an issue of build time, but overall confidence in the quality and security of the code, and knowledge of who the authors even are. Also, it just adds complexity and magic, and sometimes I just want my code to be simple and tight and understandable from beginning to end.<p>One idea to resolve this is if rust has a standard futures runtime API, and you can just choose one in Cargo.toml or something. By default it would be a built-in single-threaded runtime, but you could choose tokio if you want. If you want to call async code from sync code, there would be an easy way to do it (maybe more syntax?) that would use whatever runtime you chose in Cargo.toml.