Seeking project ideas and purpose to learn Rust

Hello everyone,

I’d like to ask for some advice. I want to start a project in Rust, but I haven’t found any good ideas yet. Does anyone have suggestions?

My main question is really that. I want to do a project because I’m feeling confused about why I’m learning Rust in the first place. To help you understand my situation, let me share a bit of my story.

I used to be a frontend engineer. The first time I heard about Rust was in the news that Webpack was going to be rewritten as Turbopack. Afterward, I read some articles and noticed that a lot of frontend tools were starting to use Rust. I thought, if I don’t learn this language now, I might be left behind. That’s how I started my Rust journey. In early 2023, I began with The Book, then moved on to Command-Line Rust, and finally read Programming in Rust, though I skipped some of the later chapters.

After that, I read crafting interpreters and implemented a version of it in Rust. Over the next year, I joined a project to develop frontend tools and worked specifically on a linter written in Rust. Then in July 2024, I was laid off. When I applied for new frontend jobs, it seemed like my Rust experience didn’t help much in the eyes of interviewers. That experience made me question why I was learning Rust in the first place.

I wondered if maybe I wasn’t skilled enough, so I tried to level up by reading advanced material. I went through Rust Atomics and Locks and watched some of Jon’s videos. The content was great, but it didn’t really answer my questions.

Right now, I can’t seem to focus on just reading—I really want to make something. If I had to set a goal, I’d say I want to create something that could get 100 stars on GitHub. Without making something, I don’t feel like I understand why I chose this language or how to keep going. I don’t know if I’m being too practical, but I hope that what I spend time learning can lead to a better life. Right now, my income isn’t enough for me to contribute to the community purely out of passion.

It’s been a few months since I last wrote any Rust code, and I’m unsure what to build next. I believe my doubts aren’t really about Rust itself. If I’d chosen C++ instead, I’d probably feel the same way now.

Lately, I’ve been looking at repositories by Evan Wallace and Andrew Gallant, but I haven’t found the right inspiration yet. Has anyone been through something similar? If you have, I’d really appreciate any suggestions on what I could build. It could be a project idea, or anything you’d like to say after reading my story. I’d be happy to hear any advice.

Programming languages are tools, and as with any tool you have to ask yourself: How does tool X help me to do Task, compared to tool Y?

You shouldn't try to learn new programming languages just for FOMO, or, as you have already mentioned, you'll probably lose interest really quick.

IMHO, people getting the idea that the reason why so much tooling is today being written in Rust is because it's fast is just plain wrong. Why? Because they're totally missing the point that performance-wise Rust is no different than other, more established, programming languages such as C and C++. No, the true reason to use Rust is because of correctness, and this should be what people should be motivated about when thinking about learning Rust.

Heck, it's sad that even people in the Rust foundation get this wrong :pensive:.

You mentioned that you are (or used to be a frontend developer). Do you know about TypeScript? If so, you might be interested in learning the differences between TypeScript's type system vs. Rust's type system. That might give you a good starting point so that you start understanding what sets Rust apart.

1 Like

Sort of, kind of. I would say that if reimplementing your tool in a compiled language will gain significant performance over whatever you have in some interpreted language then you have little choice among popular languages. C and C++ are not really an option for those who are used to convinces like NPM and whatever they have in their ecosystems. That leaves Rust, with its excellent package and build system and the high level language abstractions it offers. Rigorous correctness is a huge bonus of course.

This statement is often used a bit wrong as well. Highlighting Rust's security and correctness makes sense when comparing with C, C++ and other fast but unsecure languages. But all the other high level languages with garbage collectors are correct and secure as well, and some of them are even fast. But they generally are not systems programming languages with support for all the low level stuff like kernel and device driver development, or use in embedded systems where a large runtime system with GC might be a problem.

I'm not using correctness as a synonym to safe. Correctness is about what you can encode by leveraging the type system, and that sets Rust apart not only from low-level systems programming languages, but also from high-level programming languages.

That distinction is a bit too difficult for me. Users of Java, Kotlin, Julia, Go, and many other languages typically say that their programs are safe and correct. I guess you are referring for example to Rust's Option and Result types and that there is no NULL which might lead to accessing invalid memory?

It seems to me that if you have a tool written in some language that has been around for years and works then it takes some major incentive to rewrite it in some other language. Give that your tool currently works an obvious motivation would be improving it's performance. And if you come from the Python, JS, Ruby kind of world you don't want to take a step backwards in ease of use by trying to use C or C++. Enter Rust.

I suggest you to "unattach" from Rust completely while looking for a project. Rust can be used for nearly anything (even frontend, instead of JavaScript), so the problem becomes "which project am I interested to implement" instead of "what can I write in Rust"? I.e. you should not even be on a rust forum at that point.

Using Rust in seemingly "not fitting" places would just be an additional challenge and learning opportunity.

2 Likes

I think all the resources you read were about programming - and of course implementing tools that help programming is one type of project. It's natural to think of those first if you are foremost a programmer.

But maybe you could find a text book on a topic outside that - do the exercises in rust. Mathematics, Physics, Machine Learning.

At lot of academic papers are accompanied by code these days - sometimes good code, sometimes bad code; Look at some of those.

1 Like

Thank you, this answer gives me a different aspect to think.

You shouldn't try to learn new programming languages just for FOMO

Yes, highly agree for me now, the another reason I tried Rust is because I’m facing a bottleneck in my front-end learning and want to try learning another language to see if it can help me make a breakthrough

Thanks, may I ask what insights could this line of thinking bring?

That sounds like a great idea—I’d like to give it a try. Just to make sure I don’t misunderstand your point, could you recommend a good site to search for papers on this topic?

A lot of the code is on github - but you would probably not find it there directly. Unless you search for precisely the topic. You would find a link to it from a paper they have published. That's why reading a text book - with many references might be a good start.

Hinton and Hopfield won the Nobel in Physics this year.
Hinton has published a lot - and some of his code (mostly matlab) is on his home page.

I did a python version of his forward-forward algorithm earlier this year - just mentioning something that interests me personally.

That research is interesting because it is more "brain like" and has the potential to be more energy efficient. A brain needs 20W of energy - one NVIDIA GPU needs 100s or 1000s of Watt.

Cellular automata is another topic that is interesting to me - they are Turing complete and also an alternative to the "linear algebra" approach to AI that is popular right now.

1 Like

Strictly speaking, those are only enums. But yes, they are part of the tools to achieve correctness in Rust.

When talking about correctness I'm talking about the type system in general. With Rust, you can enforce more invariants at compile time than almost any other programming language (except functional programming languages such as Scala, Haskell, etc.), and some APIs simply can't be expressed in other languages. Take for example the following signature:

fn get_connection<'a>(token: &'a mut Token) -> Connection<'a>

If you were developing a connection pool and wanted to prevent resource contention for the connections, this signature would make sure that the total number of connections would be kept under control, since you would need to drop a connection before you get another one within a call stack. And that's being enforced at compile time: No overhead at runtime at all.

2 Likes

The big one to me is concurrency.

Pervasive sharing in languages like Java or Go mean that the language doesn't have any tools to help you get concurrency right. Sure, it's not UB because they use atomics everywhere, but that's just not-broken, which is different from correct.

In most languages it's really easy to use a hash table, have it work great for months, then unwittingly change that code to be used from multiple threads (or async.await tasks), and introduce a subtle bug that doesn't show up until production.

Getting a "no, that's not Sync, you can't use it from multiple threads at once" error from Rust as soon as you write the code is a game-changer for things like this.

5 Likes