Live data from Hacker News

Show HN: Cot: a Rust web framework for lazy developers

mackow.ski

111–115 of 115 posts

Re: Show HN: Cot: a Rust web framework for lazy developers

#111
post #75

I would love a Django clone in Rust that does NOT do async. Dead simple to debug instead of performance oriented.

This is exactly what I'm looking for. Rust is my favorite languages in many domains; I use Python and Django for web backends due to the immature rust ecosystem there. I am not a fan of Async for various reasons, so: Batteries-included web backend + rust + not-Async would be amazing!

Re: Show HN: Cot: a Rust web framework for lazy developers

#112
post #44
post #29

>Cot was born out of frustration - the kind that every Rust developer feels when searching for a batteries-included, Django-like web framework What about Django?

If Django works for you, I'm absolutely not saying you should switch to Cot immediately! Some people like to have as many type-safety and compile-time checks as possible, so that's the crowd we're trying to satisfy.

Then why shouldn't those people choose Ada, which also has Ada Web Application (AWA)?

Re: Show HN: Cot: a Rust web framework for lazy developers

#113
I'm currently using Rocket, Maud, Rusqlite, and Serde for the first time on a project. I'd like to offer my perspectives as someone new to this space.

Rocket routes work pretty well. I like being able to derive FromForm and have it reliably work, including nullable Option fields.

Maud is just wonderful. It's going to be hard to go back to plain HTML after getting the same logic in such cleaner syntax.

I haven't quite figured out authentication yet. Rocket has some functionality, but I might punt this up to Nginx (I'm using Nginx to proxy to Rocket). I'd like for cookies to be a little easier.

Rusqlite has not been fun. I couldn't get Rocket to compile with Rusqlite integration, so I've been manually opening the database for each request. (This is a very, very small site that I'm working on, and web dev is not my main role.) Anyways, all my queries are so verbose and have tons of seemingly-unnecessary Ok() statements and ? syntax. It's nice to map_err to Rocket's HTTP error types, although I'd like a less verbose version. Right now it feels like writing Java with long boilerplates that I'm copying for each route.

Re: Show HN: Cot: a Rust web framework for lazy developers

#114
post #75

I would love a Django clone in Rust that does NOT do async. Dead simple to debug instead of performance oriented.

I just had an issue yesterday in my company where a backend keeps crashing, because a function blocking the main thread, which means that the healthcheck endpoint was not responding... Async is definitely a needs

Async is not "definitively a need". It's a fad from browser JS where it is actually needed. Async would not have solved your issue, just delayed it until OOM and that would have make debugging it harder. Case in point.

Re: Show HN: Cot: a Rust web framework for lazy developers

#115

What is the competitive landscape looking like these days for Rust web frameworks? I couldn't help but feel a bit insecure last time I was exploring the various options because none of them seemed to have the maturity or longevity of frameworks from other languages (for obvious reasons). Is there one framework that stands out from the rest from an "investment risk" perspective? In other words, if my company is going…

I would say pick Axum or Actix, these are the go to right now with lower risk to be abandoned, But they aren't batteries included. Here is a list of blessed[0] libraries that might help you to choose the most popular ones in their respective category, but at the end depends on you to pick the one that has the biggest community. My go to is Axum + sqlx most of the time. [0] https://blessed.rs

Pretty surprised not to see SNAFU [1] on that list. Very comfortable to use, kind of a mix of thiserror [2] and anyhow [3] I think.

[1] https://github.com/shepmaster/snafu

[2] https://github.com/dtolnay/thiserror

[3] https://github.com/dtolnay/anyhow

Post reply on HN