Live data from Hacker News

Is Rust Ready for the Web Yet? (2020)

blog.devgenius.io

61–69 of 69 posts

Re: Is Rust Ready for the Web Yet? (2020)

#61
My larger concern is whether it is time efficient. Rust seems quite low level.

It's no coincidence that web is full of bloated frameworks - because the emphasis is on cranking out yet another generic page not optimising things to within an inch of its life.

Re: Is Rust Ready for the Web Yet? (2020)

#62
post #27

I've built all my web backends in either Flask or Django - what are the selling points/advantages of using Rust vs. Python in this context? Certainly not arguing against it but am very curious and unfamiliar with Rust. If anyone has moved from Python to Rust for this kind of work, can you speak on your experiences with doing so?

If you really need speed (high RPS) then Python is going to tap out at some point. Normally for line-of-business apps and most startups, developer productivity trumps raw perf IMO (obviously depends on the domain though).

There is some argument that you (or at least some developers) can be more productive with a strongly-typed ORM, but I think FastAPI / Django-ninja capture most of these benefits in the Python ecosystem so it’s not a big win in this dimension IMO.

But in summary it’s a perf vs productivity trade-off.

Re: Is Rust Ready for the Web Yet? (2020)

#63

With all due respect does anyone else find Rust's syntax just horrible? #[get("/")] #[actix_web::main] std::io::Result HttpResponse::Ok().body("Hello world!") I mean, blegh! Anyway, just making conversation please don't take offense, some people think Ruby looks like ass.

[deleted]

Re: Is Rust Ready for the Web Yet? (2020)

#66

I won't use it to build a website until we get something like Django, or at least something like Flask's ecosystem. I want automatic (or at least easy and without DRY problems) DB migrations. I want an auto-generated admin page; auth; email. I will continue using Rust for embedded, 3D graphics, and desktop PC programs, but won't touch it for websites until this is solved.

I am a longtime django user my self(since v0.95) and rocket comes pretty close to it.

Re: Is Rust Ready for the Web Yet? (2020)

#67
post #27

I've built all my web backends in either Flask or Django - what are the selling points/advantages of using Rust vs. Python in this context? Certainly not arguing against it but am very curious and unfamiliar with Rust. If anyone has moved from Python to Rust for this kind of work, can you speak on your experiences with doing so?

Modern web will be Python + Django/Flask + Js/Typescript (and maybe Swift or Java for mobile apps). You can replace almost all of that with Rust, so you'll get one language to rule them all, but focusing on Python part only: obviously performance, sane tooling and dependency management, statically typed language results in less runtime errors. Overall Python gets you a lot faster from 0 to "it works on my laptop", Rust gets you faster to 'it's good enough to put it in production".

Re: Is Rust Ready for the Web Yet? (2020)

#69

With all due respect does anyone else find Rust's syntax just horrible? #[get("/")] #[actix_web::main] std::io::Result HttpResponse::Ok().body("Hello world!") I mean, blegh! Anyway, just making conversation please don't take offense, some people think Ruby looks like ass.

Rust is verbose, but here you don't need to build response, just return string and Actix will handle that.
Post reply on HN