Hi everyone!
I started learning Rust a couple days ago and I’m having fun with it. I’m trying to learn both for fun but also I plan on going back to Uni at the end of this year after roughly 5 years out of education.
I’m trying to think of projects I can do down the line to practice and for fun. Something I really want to build is a full stack web app (I have some basic knowledge of front end.)
Since I’m trying to learn rust, I was thinking of using something like Actix to build the server.
As for database stuff, I was thinking of postgres since that seems very in demand rn!
As for front end, I’m torn between using something like React which I’m somewhat familiar with or trying something like Yew to write it all in Rust!
I mostly would like some feedback on my plan (I understand there aren’t many details given, this is mostly an idea a couple months down the line), if i need to change my scope, if theres anything I should change, any resources that might be helpful, or really any advice!
The biggest thing imo is to have the program do something you want/need, without that motivation becomes difficult and having a problem to solve gives you something to design for. I’ve been working away at my own side project to learn rust for a while building a log search server Crystalline
I ended up using Poem for the HTTP server, Leptos + Tailwind/DaisyUI for the frontend, and Tantivy for the main data storage
A bit of context, I maintain a small laundry list of open source utilities I’ve built up over time… when I want to try out a new language I just take one of my libraries and convert it into the new language. I’ve found that generally does a good job of highlighting language shortcomings and specialties (especially since my packages lean heavily on syntactic sugaring) while also giving me an end product I can run up against a nice suite of robust tests.
I might suggest finding a small (like a dozen source files tops) library you like and just converting it into the new language as you’ll be forced to deal with more serious problems than a toy project while also potentially producing something useful on the far side.
Thats quite a good idea! Thanks :> I’ll definitely keep that in mind as I move forward!
I started with rust 2 years back. It has been amazing since. Just build stuff you want to use, even recreate simple apps that you use everyday and have a rough idea on how they work. Getting used to the borrow checker takes time so don’t do something massive. Also if you haven’t finished the rust book and rustlings, I highly recommend them. They are amazing materials.
You can check out my github for ideas. I have till now as far as I can remember built a notification daemon, an automatic music player, a time management app, a video server, video library manager, a C/C++ build system and lots of other stuff. Reading other people’s code will make you get best practices.
PS Don’t learn from my builder_cpp project. The code is utter garbage, but it was how I used to do stuff in the early days
Do not use Yew. It’s no longer being maintained. If you want to use a Rust frontend framework, you should check out Leptos. It will feel familiar if you’ve used SolidJS before, as it was inspired by it.
Here’s some (KIM i’m not experienced in webdev at all, only low level stuff):
-
Copy shit. I’m making a forum software and wherever i’m confused i literally just see how other forum softwares did it lmao
-
Split your project into crates. It’s much more modular and easier to work with
-
My personal favorite stack is: Axum/Diesel(postgres)/Dioxus/DaisyUI. You should check some of them out but they may not fit you.
GL on your project!
Thanks for the reply . I appreciate the advice! Ill definitely check some of those out, DaisyUI looks really cool! Ive used tailwind quite a bit so seeing the stuff daisyui can do is really neat!
-
I made a super basic blog by hand using actix-web. Basic processing of markdown into HTML and then present it through handmade (and chatgpt assisted) html+css with htmx to spice things up and try to do mimic a single page application. I don’t have much web experience though, so much of it is crude.
I don’t host myself yet, I used Shuttle which procides free hosting for hobby rust projects. It also comes with postgres so I have been looking into how to move from storing articles in files to a database for more consistent article support. Shuttle also supports other things than actix-web, so you don’t havr to use that specifically.
While I said blog, I don’t support new articles without a redeploy yet… And it only has like 3 random articles based on reddit posts. But it works at least.
Rust is brilliant for cli tools, which have the benefit you can usually make something useful to scratch an itch without it exploding in scope. Might be a better place to start than yaca…
Feel free to just use React on the frontend if you’re more familiar with it, but make sure you couple it with Redux. Then when the time comes you want to bring some Rust into the frontend, you can do so by writing your Redux reducers in Rust.
PS.: The blog post mentions using fp-bindgen for WASM bindings, but nowadays you’re probably better off using wasm-bindgen.
I have a couple reading config, doing thing projects lying around, written in shell, that have gone nowhere. Maybe one of them?
Most of the stuff you’ve mentioned aren’t that great a match for Rust. Write something in Rust that you would otherwise write in C or C++. It would help if you said what your interests are.