Markus Löning

Software Engineering & Machine Learning

Learning Rust

Posted at Jan 11, 2025 12:08:32 — Last modified at Dec 15, 2025 20:27:52

General resources

Lifetimes

As a Rust beginner, I understood lifetimes backwards, thinking <'a> means I’m declaring a lifetime which I then use. What that actually declares is a placeholder for a lifetime the compiler will attempt to find wherever that variable or function is used, just as it would attempt to find a valid type for a generic type <T> at the points of usage. In this sense, lifetimes and generics are similar concepts: code is generic over some lifetimes just as it can be generic over some type (thanks to wrs for making me realise this).

Projects

Ideas for projects

Debugging

Using lldb

Useful commands:

Using Neovim with AstroNvim and nvim-dap