2017 in Rust
Inspired by the Call for Community Blogposts I want to summarize my experiences and thoughts on Rust in 2017 and what I am excited about for 2018.
Reflecting 2017
2017 was an amazing year for Rust. We got 8 releases of rust itself! We got basic procedural macros allowing custom derive (also known as “macros 1.1”) in the first release last year (1.15.0). This made serde 1.0 possible, if I'm not mistaken? We got 103 stabilized APIs in 2017. This is incredible! The improvements of compiletime and also the tooling got so much better. I mean, it was awesome before. But now it is even better!
On a personal side I got a lot better at programming Rust. I wrote about 37800 lines of rust code in my main project imag and 17380 lines in other crates (authored and contributed, according to a bit git-fooing around). Is that a lot? I don't know.
Hopes for 2018
Now lets talk about 2018. This year will be amazing, I am sure.
Language features
I am really excited about the “impl trait” thing. Beeing able to return an
trait from a function will reduce the imag codebase so much, for example. We
no longer need to define our own iterator helper types but can simply return
Iterator<Item = Whatever>
!
I have no other hopes for the language itself, because what we have right now is really amazing and I honestly cannot think of ways it could be improved.
Ecosystem needs / Tooling enhancements
I'm still a bit concerned about cargo functionality for building workspace projects. From what I see, building two different crates in one workspace which share dependencies rebuilds the dependencies. This is not as intended, I guess, but that's what I see. I did not dive deep into this, so I might be wrong, though.
What I am thinking about for several weeks now is a cargo/rust tool for calculating code metrics. I think of things like documentation/code ratio, average function length, simple things... but also about cohesion and coupling metrics and other inter-module/inter-crate metrics.
Also, I tried to set up the rust language server for vim on my workstation and
failed hard. I guess this is a packaging problem with my distro (NixOS),
though. Either way, installing the rls
with a stable toolchain would be nice!
Crates I am still missing / should be improved
There are some crates I would love to have which do not exist yet.
- A (high level) email crate. There is the
email
crate, but it is mainly unstable and does not even have a0.1.0
yet. There's alsolettre_email
, which is in0.7.0
, but it doesn't support parsing of emails. - I really hope
rust-vobject
(which is one of the crates I contributed to in 2017) will improve even more and be the defacto-standard crate for handling vcard and icalendar data. - I follow the development of Cursive and from what I see it is awesome. I really hope people start writing high-level objects for cursive (like a file explorer, a form builder, a text editor like thing, a tab helper and so on) so I have to do less work when implementing a TUI for imag. (To be fair, there are already some crates available).
- I hope there will be some awesome crates for handling multi-media files and reading/writing their metadata. Especially audio formats and video formats are important to me with imag.
- Rust bindings for pass would be awesome.
- Markdown (and other formats, like asciidoc, restructured text, textile and maybe even bbcode) parsers and renderers should be written/improved
- A API for IPFS or maybe even a protocol implementation
- Qt bindings (yeah, I have high hopes for 2018)
There are possibly thousands more... But I won't list them all.
tags: #open-source #programming #software #rust