Rust
Rust is a programming language designed for high performance and memory safety. It’s quite tricky to write, because the compiler is extremely picky for the sake of ensuring your code is correct.
I’ve never written it professionally, but I like it for building personal tools that I need to be fast, and as a way to try a language that’s different to what I normally write.
6 articles
Resizing images in Rust, now with EXIF orientation support
A new version of Rust’s image crate has support for EXIF orientation, which allows me to resize images without mangling their rotation.
randline: get a random selection of lines in a file using reservoir sampling
I wrote a tiny Rust tool to get random samples in a memory-efficient way, and I learnt a lot while doing it.
How I test Rust command-line apps with
assert_cmdSome practical examples of how this handy crate lets me write clear, readable tests.
My (tiny) contribution to Rust 1.64
A suggestion for a better error message to help people who work in multiple languages.
Creating coloured bookshelf graphics in Rust
Explaining some code that draws coloured rectangles in a way that looks a bit like an upside-down bookshelf.
The ever-improving error messages of Rust
An improvement to Rust’s error handling that I almost reported, until I realised it was fixed.
2 notes
Use
std::io::IsTerminalto detect if you’re running in the terminal in RustThis allows me to suppress ANSI escape codes if the output is going somewhere other than the terminal.
Rust macros are smarter than just text substitution
This is a safety feature that prevents macros expanding in an unexpected way.