this post was submitted on 11 Jun 2023
16 points (100.0% liked)

Programming

13882 readers
13 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

I’m currently going through the process of teaching myself Rust as a fun summer project, especially since it’s different enough from the Java/Spring stack I use at work regularly. What are some interesting projects I can work on in Rust to get some familiarity with how the language works, and get an idea of some of the libraries I can use with it?

top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 2 years ago
[–] [email protected] 3 points 2 years ago

If you're not opposed to books and have an interest in gamedev as well, then maybe give Hands-on Rust a shot. After some basics, it covers building a dungeon crawler (roguelike).

Admittedly, I own a copy but I haven't had the chance to go through it yet. I've heard positive things about it, though. Might start soon, wanting to get more in-depth with Rust myself recently.

[–] [email protected] 3 points 2 years ago (2 children)

I like to start out any new language with an implementation of Conway's Game of Life. It's relatively simple, but tends to exercise a decent bit of the language.

[–] [email protected] 2 points 2 years ago

Seems like a good way to play around with multithreading, SIMD and even shaders if you wanted to.

[–] [email protected] 1 points 2 years ago (1 children)

You know, I’ve never implemented Conway’s game of life, and that sounds like an excellent way to work on a new language

[–] [email protected] 1 points 2 years ago

It's a fun little project to do :)

[–] [email protected] 2 points 2 years ago* (last edited 2 years ago)

Rust really shines with parsers and generators. They are easy enough and fun to write. Maybe write a lisp with it? Or a prettifier for your favorite language...

If you go with a parser, this one is an interesting crate to start messing around with:

https://github.com/maciejhirsz/logos

[–] [email protected] 1 points 2 years ago

What are some interesting projects I can work on in Rust to get some familiarity with how the language works

My recommendation is always the same, regardless of the language:

https://adventofcode.com

(And here is some dogfood: I've created [email protected], so you can ask questions there and/or share your solutions)

[–] [email protected] 1 points 2 years ago (1 children)

For my own projects I’m trying to build things I actually want. Tools for myself. But now the hard part becomes identifying a tool you wish you had, and scoping it down enough so that it’s appropriately sized for a new language. Tricky to approach the task from two ends.

[–] [email protected] 1 points 2 years ago

Yes! An example: I needed to start a journal to write my thoughts, therapist's orders. Also wanted to learn kivy and write a basic app for android. So I wrote a little journal app for myself to make me want to journal, and i learned the basics of kivy framework! Sorry its not a rust example

[–] [email protected] 1 points 2 years ago
[–] [email protected] 1 points 2 years ago

For me "scratch your own itch" is what works best for keeping up the motivation. Think of a tool or service that you'll actually want to use yourself and implement that in the language you are learning. Or create a better version of an existing tool that you regularly use.