🏠 Home
Lyokolux's blog

A (big) list of Rust lang resources


As I learn Rust step by step, I’ve listed some useful resources along the way. Hey it’s useful to have a toolbox under one’s arm.

Official resources

The Rust book is a reference to learn the theory. Rust by example provide great snippets of how Rust code works piece by piece. Maybe you want some recipes directly? The Rust cookbook exists. Or some Practice? Rust By Practice is there. Resources on Wasm goes brrr with the Rust Wasm book. Hey! More Rust Wasm resources with Rust Wasm Zines on Github. Going Pro? Another book exists: Rust for professionals Or simply getting tips? Effective Rust lists 35 techniques and community patterns. And rust cares about performance, so there is another book about performance. LEt#s introduce the self-explanatory Rust Performance Book

The french service for computer security published a guide about rust for secure applications development: ANSSI-FR/rust-guide: Recommendations for secure applications development with Rust

We also get resources from Google: google/comprehensive-rust: This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust to everyone.

Rust Design Patterns are also shared in the dedicated book.

There is a french starter book, because why not.

Writing Interpreters in Rust: a guide

The unofficial guide to learning Rust for Typescript developers is great when you know Typescript!

All example can be shared and run online with the Rust Playground

You want to get a job? Rustjobs.fyi lists them.

Awesome Rust

Some takes time to reference specific great resources too.

Take a look into the curated list of the best crates on blessed.rs. Awesome Rust is another curated list of crates.

Idiomatic Rust is a peer-reviewed collection of articles/talks/repos which teach concise, idiomatic Rust.

Oh well, someone made a list of resources too: https://readrust.net/

I will keep the CLI and Rust projects for another blog post, because it is starting to be big.

Feedback of Rust user

Creating a recycling factory in 6 months? No way! Yes with Rust. Crazy stuff there Rust in the Wild: A Factory Control System from Scratch

The underrated dbg! macro is a great help while debugging. Thanks for the toot on Mastodon, dcz@fosstodon.org.

How Mozilla’s developers ported the Firefox’s crash reporter to a new stage with the language. How they implemented Microsoft Exchange in Thunderbird. How they implemented part of Servo: Programming Servo: the incredibly shrinking timer. - Programming Servo - Medium

If you’re hearing the rust community, a report from Google made some signals: Rust developers at Google are twice as productive as C++ teams. It was also the case in 2022: Rust fact vs. fiction: 5 Insights from Google’s Rust journey in 2022 | Google Open Source Blog. It goes on with posts about it such as Tim McNamara (@timClicks) – Now is the time to bet big on Rust

From hours to 25 minutes to generate 1.5 million PDFs! Wow. Great insights. So much WoW.

How Rust can facilitate new contributors while Decreasing Vulnerabilities reports that security vulnerabilities introduced by new Rust contributors are largely less than C++ contributors

A little story about the yes unix command implemented in Rust.

Rust is so broad that (FR!) it reaches the kernel (not Linux): Kerla : un nouveau noyau de système d’exploitation écrit en Rust et compatible avec l’ABI Linux, ce qui devrait permettre d’exécuter les binaires Linux sans aucune modification

So much Downloading 100,000 Files Using Async Rust - Pat Shaughnessy

Blog posts

About the rust analysis from lifetimes and borrowing the language can further improve itself. References are like jump was shared few days ago. Rust wont save us, but its ideas will shares the same point of view.. and wrote about the reasons.

Some strategies to plan on long term Rust programs (about decades) are described on Long-term rust project maintenance of corrode.dev.

Being mediocre can work with Rust. Matt Palmer shares it with The mediocre Programmer’s guide to Rust. I personally like how the programming skill improve over the reading.

PhantomData helps encoding rules in the type system. Write cleaner, more maintainable Rust Code with PhantomData of Aayushya’s Substack provide an example. Why type systems matter? It improves readability, help and provide context. it’s also a pattern: The Typestate Pattern in Rust - Cliffle

An example of Huffman encoding in Rust: amos - Huffman 101. Another post from amos goes pretty hard about Reading files the hard way - Part 1 (node.js, C, rust, strace). Recursive iterators in Rust, Rust generics vs Java generics, A half-hour to learn Rust , Declarative memory managementand more on the amos blog!

Functions Everywhere, Only Once: Writing Functions for the Everywhere Computer shows how to get your functions to run everywhere is close to be real with Wasm. It starts with small examples.

Frustrated? It’s not you its rust shares the frustration while learning the language. Rust has fundational learning! “The language is evolving, and we, collectively, haven’t yet figured out everything that new way of thinking unlocks.” So How to Stick with Rust - DEV and Rust can be difficult to learn and frustrating, but it’s also the most exciting thing in software development in a long time | InfluxData

println!() can be slow depending of how much logs is written. The Fast I/O post of madelen.me shares the optimization for it.

Eatonphi.com wrote about a memory management comparison between languages on Zig, Rust, and other languages.

The language does not catch everything. Some mistakes Rust doesn’t catch

High-Order-Types and You shows a similarity between cool javascript array functions, functor and Rust.

There are also Lessons learnt from building a distributed system in Rust.

Learning Rust in 3 attempts: RTFM, a hobby project and read a book.

How I have fun with Rust. Fun! We all started with Rust: First Thoughts - DEV Community 👩‍💻👨‍💻 and made some experiences.

About FTS5 in SQLite in Rust: Structure of FTS5 Index in SQLite. It’s an extension of SQLite.

A naming issue arised from a C++ algorithm. The portage to Rust spotted it! A curiously recurring lfietime issue indeed.

A good rule of thumb is to push ifs up and fors down. It optimizes the code execution.

About Boxes and Trees - smart poiinters in Rust

A cursed Rust code tot print things the wrong way.

Opmtimization of Rust serialization. Yes it’s possible.

A way to deploy Rust code with nearly 0 configuration by Matthias Endler in “Deploy Rust Code Faster”.

Mixing original tools with htmx, Rust & Shuttle can be interesting.

24 days from node.js to Rust. A Rust guide from a JavaScript… | by Jarrod Overson | Medium

Was Rust Worth It?. From JavaScript to Rust, three years… | by Jarrod Overson | Oct, 2023 | Medium

Oh! It has of course some algorithm optimisation :) Analyzing Data 180,000x Faster with Rust. There are always places for optimisations. ALWAYS: Reducing code size in librsvg by removing an unnecessary generic struct - Federico’s Blog

Data structure in comparison with Object Soup is Made of Indexes

Object Soup is made of Indexes compares Python and Rust. How they use RAM.

Should I Rust or should I Go. Lol. Both languages seem complementary: Using {Blocks} in Rust & Go for Fun & Profit. Comparing the two are maybe not relevant (FR) Rust, langage de programmation pour luddites

How we implemented serverless full-text search in Rust – Grafbase

Rust Doesn’t Have Named Arguments. So What? Enums, builder pattern and other ways.

Another data structure topic: Rust scalar types

An attack on crates.io with a malicious package didn’t pass. It was used to sretrieve and send information to a secret Telegram channel. Rust Malware Staged on Crates.io

The same question again: Why Rust? - Qdrant. “However, experience has conclusively shown that this is a net win. In fact, Rust lets us ride the wall, which makes us faster, not slower.” Again Why Rust? — Rerun and again Why to choose Rust as your next programming language | Opensource.com Or the opposite Why Not Rust?

Rust is efficient we know! Rust Is a Scalable Language (compared to other low-level languages).

Did you saw all this advocacy part in the next section? Well Stop Whining about Rust Hype - A Pro-Rust Rant | Optimal Tour. Everyone is Rewriting It In Rust (RIIR) anyway: Why Discord is switching from Go to Rust - Discord Blog. Even random thing I don’t know! Rewriting m4vgalib in Rust - Cliffle

Argh! Why is my Rust build so slow? But we have Fast Rust Builds Moreover blogwerx: The Rust compiler isn’t slow; we are.

We love tips. here’s 12 with 12 Rust Tips and Tricks you might not know yet - Federico Terzi - A Software Engineering Journey. More Rust Tips and Tricks :: Jon Gjengset

All of this? And Rust is not a company!

Yes you can tell the compiler to remove your function at compile time and inline it in code: Inline In Rust

There is always the question: which language is the fastest. This link dump needs more of comparison :-D Which benchmark programs are fastest? | Computer Language Benchmarks Game

Another broad topic with Rust! As a hobbyist rust developer, I want to think less about error handling :: A blog — Just a blog. We need to know how. Error Handling Survey in Rust

About traits Existential types in Rust | varkor’s blog

About the terrific unsafe code: Unsafe as a Human-Assisted Type System

Iterators are also wide-spread in code. Rust Lifetimes and Iterators || Tidbits and Stuff. How to use them effectively? Effectively Using Iterators In Rust

and we come to parallelism and Join Your Threads

My Favorite Rust Function Signature | Brandon’s Website is a “tokenize” function, because it’s nearly poetry. See the signature! A simple one is drop(). See My favorite rust function

More topic to cover? Video codecs! Demystify video codecs by writing one in ~100 lines of Rust

Who Builds the Builder? Consider to add a .builder() method to Foo that returns FooBuilder :)

Rust can be low level. Rust as a High Level Language — Llogiq on stuff. Both are possible.

Everything can be one day rewritten in Rust: https://transitiontech.ca/random/RIIR.

Someone got a great first contribution. Helpful! Contributing to Rust Open Source

Yes: it’s great to have simple showcases. Karol Kuczmarski’s Blog – Add examples to your Rust libraries

Advocating Rust

Because Rust is efficient it’s a great language for Lambda functions. Luciano Mammino goes a bit in depth in Why you should consider Rust for your Lambdas.

A video of Jon Gjengset about why you should evaluate Rust. How it can fit your needs and when it does not.

Embedded Systems is also convenient for Rust as the resources are limited. Why is Rust used a san embdedded system programming language? get the topic covered by Hexavik. Does it compile on Raspberry Pi though? Program the real world using Rust on Raspberry Pi | Opensource.com

Some meetups are happening during lunch. Rust for lunch happens between 12 and 13 GMT (London time).

Should you get interested by Rust? A french posts of Laurent Cocault get to the point. Maybe baby steps (fr) with Premiers pas avec le langage Rust - Code Heroes

The Serbian registry welcome the Rust community on the .rs Top-Level Domain. A toot with the email show this greeting.

To avoid conflict with the rust (metal) and the Rust (game), please use the #RustLang tag on social media. Mo8it shares why on Mastodon.

Upgrading a JWT library was hard. Orhun showed how to keep user sessions working and what was breaking in the JWT. How would you generate some random numbers in Rust? Orhun cover the topic “Zero-dependency random number generation in Rust - Orhun’s Blog”. The post is instructive about the different strategies in use.

Basic differences between String and &str in the post Understanding String and &str in Rust. And an in-depth explanation with Working with strings in Rust - fasterthanli.me. A comparison to C with amos - Working with strings in Rust. At the end, all parameters should use &str whenever possible for performance instead of Strings. Karol Kuczmarski’s Blog – Taking string arguments in Rust

Of course a White House paper made Rust appealing. I share some links.

Sharing love about Rust? A webzine Fireflowers of Brson collects them.

Rust is definitely ready for production: Why Rust in production.

Are we web yet?, and other many “Are we X yet?“. Are we game yet? - Rust

Why Rust is the most admired language among developers - The GitHub Blog

Why use Rust on the backend?

  1. If you know the tech already :)
  2. Your service interoperates with services that are perf-critical or can be supported in the future
  3. The Serde library is awesome. Check the doc and use cases.
  4. It is not amazing with databases but it’s very good. Diesel deserves a plus-one: it generates all your SQL queries for you, from a typed SQL schema that it generates from your SQL migrations. It is then similar to the feature of Prisma. It is not perfect though, because of error messages: it makes no sense, or are 60 lines long or difficult to factor out common code.
  5. It has better modeling of the business domain: enums and unclonable types.
  6. Reliability: we already know it.

Rust is Inevitable? Yes because it’s safer than Zig: Chris’s Wiki :: blog/programming/RustIsInevitable

NPM published about Rust with a Rust-npm-Whitepaper.pdf. A case for Rust against CPU-bound bottlenecks

It is now well known, but it was the first merge of Rust code into the Linux kernel in 2021: ## [PATCH 00/17] Rust support - ojeda

… Even Apple Is Interested In Migrating Their C Code To Rust - Phoronix

Rust modules vs files - fasterthanli.me are different.

Two Beautiful Rust Programs and small ones. There are nearly code snippets but beautiful :)

Even scientists are using Rust. But Why scientists are turning to Rust?

Some raises money and uses Rust: Meili raises 1.5M€ for open source search in Rust

Stackoverflow’s survey shows it every year but Why is Rust the Most Loved Programming Language?

There’s indeed a Path to Rust :: Jon Gjengset

Bookmarks in the browser

I’m just gonna copy and paste them in bulk:

Do you have more resources? Let me know on Mastodon @lyokolux@fosstodon.org.