#rust
ฝัง
- เผยแพร่เมื่อ 6 ก.ย. 2024
- Here's an overview of the TAMASHA stack that I used to build a slack/campfire clone called "SpeakWith".
Ta - Tailwind
M - Minijinja
A - Alpine
S -Sqlx
H - Htmx
A - Axum
You can check out the repository and build and run it yourself!
github.com/gam...
Hey. Amazing video; I'm glad to see others enjoying rust as much as I am.
I'm working on a Rust integration for the vite build tool which might help with your tailwind stuff. Im mostly focusing on a stack of Axum + Askama. Hoping to release it in the next few weeks. 🤞
I'm looking forward to it. Having less external deps is a big goal for me.
Hey Sandip, have you heard about dioxus? It's a rust framework which plans to Target every single platform. From desktop, web to smart watches using a single rust app codebase. It's written in rust. I am really excited about it!
Yep yep. dioxus is very cool!
The just trick is sweet. Nice build and stack 🙌
Glad you like it!
Hey,
Very nice work there, always love to see rust and htmx.
This sounds a lot like a matrix chat alternative to me, maybe take a look at that
Hm. I hadn't thought in that direction. If i pull out the chat backend, then maybe it can become more like matrix.
Your projects are unique like adventures. This inspire me to make my own.
Thanks! Would love to see them when you you do so!
Great video! Great stack!
I’m definitely going to toy around with this. I’ve been enjoying working in Leptos a bit here and there but this seems a lot more clear cut for most web dev things I would be doing.
The just file is nice extra touch!
Good job Sandeep, do you think JS devs can see a future in Rust ?
Yes for sure! i think it takes a little while to get over the initial learning curve, but after that you feel like writing everything in rust
@@_sandeepnambiar thanks I have decided to learn Rust by making a game, thanks to you
Thats great! I am a game dev during the day! Would love to play what you put out! @@ajinkyax
Tamasha, Accha nam hai bhai.
keep it up .
Thank you for video
Good video! You're making me want to start working on my starter template project in Rust that uses a very similar stack, just askama instead of minijina
Go for it! The only problem I had with it was the pain of compilation times with Askama.
@@_sandeepnambiar Yeah, that's the reason I switched back to Go. Tera has very fast compilation times, but you don't get the comprehensive checks during development as you do with Askama.
do you think yew could be a solution for your case? i mean to use yew for frontend with axum or activx for backend?
The idea behind using Htmx and hateos is that the server returns UI rendered with state. Yew (and others like leptos) are mainly front-end frameworks where they fetch once to render UI and then fetch state after. While there are ssr things in them, I'm aiming to avoid magic things, going for simple "return this html" instead.
@@_sandeepnambiar thanks for your response, really i love the idea of htmx, tailwind and alpine... but my question is, how could it works as microservice, when you just return the rendered UI instead of the data? or do you prefer to use alpine in that case?
@@SpeedCodes-oc7ed I see no problem in splitting up the UI rendering over multiple servers and the database as well. Returning html is for the final layer that is served to the users. Services can talk to each other in any protocol. Also, the trick here is to split what is returned from what is processed. You can return the serialised object as json or as rendered html based on whether the request wanted html or JSON.
dude, great video!
Great video btw... I'm also building a website with htmx, turso, Tera, and axum. I am still confused between the templating frameworks. I'm missing the render_block function from minijinja in tera.
Good luck!
I'm using askama instead of mini Jinja. It also compile check too like sqlx.
The bad news is when returning partial HTML I need to create two struct lol.
This is so hawt. I'm in love.
Why didn't you use tauri?
I assume Tauri is used for making a desktop application and if i was making a desktop application, I would definitely recommend Tauri as well! Cheers!
What database are you using? Like what cloud platform?
This uses SQLite, he mentions it in the video.
This project uses sqlite so.. the db file lives locally. But I think sqlx is compatible with postgres so there are bunch of the cloud offers for that. This project is built around you owning everything, including your data. So it's all local.
Do you know where I can deploy an axum app for free with a custom domain name?
I think shuttle.rs is a great option for rust projects.
@@_sandeepnambiar yea, but you can't hook up a custom domain without a subscription
@@evccyr hmm true. I think there are a few crates that would do let's encrypt certificates for you. Then you can use that and follow the examples in the Axum repo to get TLS .
best stack ever (just need a solutilon for css , tailwind is too much copypaste )🤣
It can be easier with picocss
Yes indeed!