DEV Community

Cover image for My share on Rust 2020
Augusto
Augusto

Posted on

My share on Rust 2020

Some weeks ago the rust-lang team made a blog post asking for opinions on what the priorities for the next year should be. It really amazes me how the team hears everybody and how friendly the community is.

I have been learning rust for more than a year already, but this year was the first where I tried to write something real and production ready with it. I've gotta say I had a lot of ups and downs with it, but I'm still amazed by the language and its ecosystem.

The language forced me to revisit some concepts I had forgotten due to working most of my time with garbage collected languages. I've also had to learn some new concepts like the ownership model that rust introduced. I believe I became a better developer after all this, even when working with other languages.

My first weeks using rust were more of a fight against the compiler and its borrow checker. It took sometime until I could finally understand and even predict some code I was writing would or would not compile. The compiler, though very strict, is very friendly. The messages are very intuitive and informative, giving sometimes, even some tips on how to solve the problems it had found.

The general feeling I have with the rust compiler is: if it compiles, it is probably right. I've never had so few bugs when developing an application like I have with rust.

After all this mostly positive experience with rust, one thing let me particularly down about the experience: IDE's. I have tried for sometime IDEA plugin, but I generally don't like to work on the IDEA ecosystem for a long time already. That left me with VSCode.

Sometimes I think I should uninstall the extension and have only the syntax highlighting due to the problems of the extension:

  1. I had to change my configuration to not autosave due to the triggering of the compiler all the time, which was consuming all my CPU very often...
  2. It is not the most accurate. I was writing bindings for a C library and very often it could not find the generated code from bindgen, thus showing false errors in my code.
  3. The autocomplete is quite poor. It works mostly for the basic types and cannot infer very well the types when you chain map calls for example.

And that is just some of the problems I had with the VSCode extension...

So in my opinion, the focus for the rust team in 2020 should be regarding improving the compiler speed (which I know they're already working on it) and the developer experience with IDEs. I know there's already one new extension called rust-analyser, but it is quite unstable at the moment.

I can see the whole rust ecosystem evolving quite fast, more and more developers trying it out and creating some really cool libraries. That leaves me really optimistic for the future of rust and I'm really looking forward to seeing what's gonna come in the next years. :)

Top comments (0)