Live data from Hacker News

Rust Is Surprisingly Good as a Server Language

stu2b50.dev

11–20 of 352 posts

Re: Rust Is Surprisingly Good as a Server Language

#11
post #7

There is an advocate on our team that wants to migrate our web service from Nodejs to Rust. While I am not a huge fan of Typescript, at least libraries are readily available and generally easy to use. On the other hand, being able to show that we are able to do monitoring, user auditing, ORM, opentracing, gRPC-web with Rust is non trivial. Now that I think of it, being able to do a "hello world" on any language is pr…

I would wait and see whether GraalVM would not help significantly with performance. After that I would try running the web service with Deno. Then I would rewrite in Go, then I would rewrite in Rust. That is not to say I think Go is better than Rust in every dimension (I prefer Rust for most things), but I think the Go community have really optimised for this one single usecase.

Re: Rust Is Surprisingly Good as a Server Language

#12
On the set_expires thing, the docs are at https://docs.rs/rocket/0.4.5/rocket/http/struct.Cookie.html#..., and “Tm” is a clickable link. Rocket 0.4 is using version 0.1 of the time crate, and the snippet in this article that looks into the time crate docs is looking at completely the wrong thing, time::Time::now from 0.2, which gets the time of day (which also, I think, helps explain the deprecation reason, because time of day in UTC is extremely seldom useful and can easily be obtained otherwise, while a full date + time in UTC is useful), rather than time::now from 0.1, which gets a timestamp.

Discussion of this article on /r/rust: https://old.reddit.com/r/rust/comments/hpzmeu/rust_is_surpri...

Re: Rust Is Surprisingly Good as a Server Language

#13

You guys think Rust is good - you should check out Ada++ (you'll have to build GCC yourself though) http://www.adapplang.com

There is so little information on the page you linked that I doubt this project is production ready in any shape and form. Ada webdev is already though as it is, I doubt that project can compare to rust.

Re: Rust Is Surprisingly Good as a Server Language

#16
post #9
post #7

There is an advocate on our team that wants to migrate our web service from Nodejs to Rust. While I am not a huge fan of Typescript, at least libraries are readily available and generally easy to use. On the other hand, being able to show that we are able to do monitoring, user auditing, ORM, opentracing, gRPC-web with Rust is non trivial. Now that I think of it, being able to do a "hello world" on any language is pr…

What is your take on TypeScript, what is it you don't like?

Not the OP but my take is that Typescript has done great things for improving JS but it's still JS and carries a lot of it's baggage with it. There is only so far you can take it while maintaining compatibility and the type system is overly complicated in places because of this. It also doesn't really give you the same guarantees that something like Rust does, I don't believe the two type systems are that comparable. On top of that unless you use all TS packages types are maintained and installed separately adding to an already tricky to maintain dependency graph that comes with Node development.

Re: Rust Is Surprisingly Good as a Server Language

#17
post #7

There is an advocate on our team that wants to migrate our web service from Nodejs to Rust. While I am not a huge fan of Typescript, at least libraries are readily available and generally easy to use. On the other hand, being able to show that we are able to do monitoring, user auditing, ORM, opentracing, gRPC-web with Rust is non trivial. Now that I think of it, being able to do a "hello world" on any language is pr…

What does he think will improve? Migration for the sake of migration is a waste of everyone’s time.

Re: Rust Is Surprisingly Good as a Server Language

#19
Why wouldn't you just use OCaml, Haskell, F#, or Scala, where you've got much more mature web framework options? Don't get me wrong, Rust is fine, but if you don't need its memory management then why make trouble for yourself?

Re: Rust Is Surprisingly Good as a Server Language

#20
post #7

There is an advocate on our team that wants to migrate our web service from Nodejs to Rust. While I am not a huge fan of Typescript, at least libraries are readily available and generally easy to use. On the other hand, being able to show that we are able to do monitoring, user auditing, ORM, opentracing, gRPC-web with Rust is non trivial. Now that I think of it, being able to do a "hello world" on any language is pr…

Rewriting is very expensive, and the advocate will need to make a VERY strong case for Rust if they're asking your company to invest in replacing it - and alternatives have to be suggested as well, including other languages and a good list of things wrong with Node / TS. Consider developer availability as well.

I don't think a strong enough argument can be made. I'm sure you CAN write web services in Rust, and that in very specific cases it'll have some benefits over Node, but honestly very few people work in an area like that.

Disclaimer: I've settled on using Go to rewrite an existing application. The original app was written in PHP; nothing wrong with PHP per se, but the existing codebase is a mess and the PHP version is hard to keep up to date because of LTS versions of operating systems + very slow and careful updates at our customers (it's network infrastructure). For me, switching to a compiled language that produces a self-contained executable was a compelling argument. I have to admit that I do kinda pine for something like Java again though.

Post reply on HN