Hacker News new | ask | show | jobs
by sph 1312 days ago
Eh, HTTP with Rust is as fun as HTTP with C++. In both cases, there's people that swear they're very productive with it.

I'm building an app powered by Rust, and I love it, but I'd rather use Elixir for the Web facing part.

Perhaps when the whole async thing is more ergonomic I'll reconsider, but there is no chance any Rust framework can be as nice as any language running on the BEAM (or PHP, or Python, or Ruby, or Go, or Lisp), especially not as nice as Elixir can be as a website backend.

Use the right tool for the job.

2 comments

Lunatic runtime for Rust to avoid the async parts might become quite nice in the future: https://github.com/lunatic-solutions/submillisecond

Not sure what it might take for someone to write database connectors for it but it does look promising.

Looks nice. But I'm not sure why the router needs to be a macro.

What's wrong with

    router.get("/foo", |req, res| -> Response {
      ...
    });
Sorry, a better link would have been https://lunatic.solutions/blog/rust-without-the-async-hard-p... Just wanted to comment on the async part that interesting solutions are being developed.
I'm curious, are there any specific parts of the stack that make backend dev harder for you? My experience with async Rust on the backend is that it doesn't really slow me down too much, cause most of the problems are not really relevant there. Functions handling requests are usually of a form: get request data, fetch sth from the database, return a response. In this context you don't really need to care too much about async, lifetimes, ownership etc.