I’ve been a user of Rust now for 2 years. It was something of a revelation – I was amazed at how well thought out the core of the language is – many classic C++ gotchas and kludges (null pointers, double free, use after free, slicing, diamond inheritance) have been completely designed out. In that time the language and compiler has evolved rapidly, with const functions, async await, and (hopefully by the end of the year) const generics. I’m lucky enough to have been working with Rust full time for most of the last 2 years, building an exchange for a fintech startup. As such performance is a key goal, and the reason we picked Rust over Java or Go. We are very happy with the choice, but there are always things we can improve on. So with that in mind. Here are my themes and priorities for what I’d like from Rust in 2021.<\/p>\n\n\n\n
Rust is already both expressive and performant, but has some way to go to match C++ yet. C++ generics are still the gold standard to beat, with specialization, const generics and higher kinded (duck) types. From the perspective of building high performance ultra low latency software, being able to express things at compile time is critical for controlling performance. Therefore I’d really like to see const generics (https:\/\/github.com\/rust-lang\/rust\/issues\/44580<\/a>), specialization (https:\/\/github.com\/rust-lang\/rust\/issues\/31844<\/a>), and GATs (https:\/\/github.com\/rust-lang\/rust\/issues\/44265<\/a>) to be pushed forward in 2021.<\/p>\n\n\n\n Rust analyser is awesome, in particular the pace of development is a sight to behold. But it’s are still not quite aligned with Rust. I’d love to see both the rust analyser team and rustc team push forward on the work (like chalk integration in rustc) that would help bring rust-analyser towards full parity with rustc.<\/p>\n\n\n\n I often still have issues with rust analyser not working on my large workspace, whereas when I open up a simple project, it’s flawless. I have yet to work out exactly what causes this, but it feels like it needs some work on large workspaces.<\/p>\n\n\n\n I love Cargo – partly because it’s not (C)Make, but mostly because it makes building rust code so extremely simple. However it has some issues as codebases scale up and get more complex. Larger codebases can use multiple languages, sometimes more than one toolchain and pre or post build processing. Not every tool was designed to work seamlessly with rust and cargo, not should we expect it to.<\/p>\n\n\n\n Rust has a stellar community full of bright developers, who are keen to contribute. I’d like to contribute, but I don’t know where to begin. Particularly hot topic issues, like GAT or specialization – the issues are huge, and I have no idea who is currently working on them or what state they are in, or even if I have the knowledge to help. If we are to get these big features out of RFC hell and into the stable compiler, it feels important that they are brought to the fore more publically than where they are now. How we do this I’m not sure, possibly a section of the main website which lists roadmap progress\/calls for assistance. These things are hard to find currently, even when you know what you are looking for :).<\/p>\n\n\n\n I’m sure many people will disagree here. I think that this is currently less critical than the outstanding feature work. Whilst we can all do with more compilation speed, I’d rather have an amazing rust analyser experience and a super expressive type system. These things together would have a much bigger impact on my productivity than a faster compiler.<\/p>\n","protected":false},"excerpt":{"rendered":" I’ve been a user of Rust now for 2 years. It was something of a revelation – I was amazed at how well thought out the core of the language is – many classic C++ gotchas and kludges (null pointers, double free, use after free, slicing, diamond inheritance) have been completely designed out. In that … <\/p>\n2. Rust and Rust Analyser, together forever <3<\/h2>\n\n\n\n
3. Scaling Cargo<\/h2>\n\n\n\n
4. Encouraging contributions on work for the roadmap<\/h2>\n\n\n\n
5. Compiler speed is not a priority<\/h2>\n\n\n\n