3 ms·
"good concurrency" Async rust is very messy and a pretty big issue atm. The tooling on the IDE side is subpar compared to Go.
by Thaxll 5y ago
"good concurrency"
Async rust is very messy and a pretty big issue atm. The tooling on the IDE side is subpar compared to Go.
- cjg 5y agoI'd be interested in hearing what you think is a problem in async Rust.
- Xevi 5y agoI'm not the one you responded to, and I haven't used Rust much myself, but one of the issues I've seen raised several times is that its async ecosystem is fractured. You have to select an async stack, and sometimes different libraries and frameworks use competing stacks, causing problems. It's not like JavaScript or Go where everything is just built into the language afaik.
- lstamour 5y agoThere’s been a decent amount of standardization on top of Tokio’s implementation of async (green threads). If a library didn’t support it at first, they probably now do using features in your project.toml requirements.[1][2] That said, I agree the standard library isn’t the size or utility of Go’s nor is the ecosystem as wide as Go or npm. Personally, I’m looking forward to the next few years when more and more companies reveal what patterns they use with Rust development. I think Rust is missing the kind of boost that Rails gave Ruby, for example, or that TypeScript and React gave Node/SSR. Or that Pandas gave Python. 1. https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features https://doc.rust-lang.org/cargo/reference/specifying-depende... 2. https://doc.rust-lang.org/cargo/reference/features.html#dependency-features https://doc.rust-lang.org/cargo/reference/features.html#depe...
- jkelleyrtp 5y agoTo write custom futures? Yes, you need to understand Pin and some advanced stuff. To use? Eh - I just turn on async_std with the Tokio flag and write go-like code with async tasks. No issues thus far.
- zinclozenge 5y agoWhat's the deal with cancellations? If you're coming from Go, the context package makes it convenient to do.
- deleted 5y ago[deleted]
- ibraheemdev 5y agoFunny you mentioned the context package, as it was pretty hacky way to work around the cancellation problem. There are some pain points with cancellation in Rust. Dropping a future cancels it, but that requires ownership over the future, and may cause unexpected behavior due to the nature of futures state machines. This, along with many other issues, is being discussed by the async working group: https://github.com/rust-lang/wg-async-foundations/issues/65 https://github.com/rust-lang/wg-async-foundations/issues/65. If you have specific suggestions, or a problem that you faced, please open an issue! It is really appreciated - async rust's problems cannot be solved without community feedback and engagement.
- kaoD 5y agoI switched to rust-analyzer and it made a huge difference. Have you tried it?