Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am playing with Rust on a side project. I use graphql with juniper on the server side, and WebAssembly on the client side, together with Vue. I love it. It's still more complex and verbose than a full javascript project, and the compilation time are long but I enjoy it.

I would recommend Rust over Typescript, if you are going to spend time on types, use Rust it's more worth it.




Any resources on how to get started?

I tought about using Rust instead of JavaScript for frontend for some time.

On the one hand, Rust is a step back, because there is quite some things you have to do more than with JavaScript.

On the other hand, Rust has an interesting type system that could save you in the long run and things like pattern-matching and expressions everywhere is even a direct usability improvement over JavaScript.

So it's not, Rust is more low-level than JavaScript, that's why it's bad for frontend, but more, Rust is different from JavaScript some parts are harder, some are easier.


I went with the official documentation of rust and rust-wasm. It was okay.

I would recommend to use the best tool for your problem. If you want to display a button and manage click events, don't use Rust it's not worth it.


Worth it in which way? Due to the types?

So the vast ecosystem and ready functionality offered by typescript or other high level languages is worth less than what exactly?


Dealing with types is boring so if I'm going to spend time on this, it should have enough benefits. In my humble opinion the rust typing system is more interesting than what typescript can offer.

The main advantage for me is the monad. Sure you could use monads in typescript or even vanilla javascript but in Rust, everything uses monads.

The vast javascript ecosystem is available to rust in the browser too. Server side it's not as big and I agree javascript has a point there. But now, if you look at the ecosystem of libraries with proper and up-to-date typescript definitions, well it's not that great.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: