DEV Community

Discussion on: Rust or Go for web development?

Collapse
 
deciduously profile image
Ben Lovy

I'd say it depends on the goal of your project. Rust is a good fit for computationally intense, high throughput situations, but will require higher cognitive overhead to put together. Golang is a language designed from the ground up to target this space, but also with an emphasis on large scale collaboration. As a result the language doesn't provide the same amount of high level tools like parametric polymorphism which can aid an individual developer, and you may need to produce more boilerplate. The standard library has a great story for webdev baked in, though, and will likely be a more frictionless experience end to end.

Collapse
 
selengora profile image
Selen Gora

Thank you for explanation, actually I don't have any project. My proffesion on frontend development but I want to learn Rust or Go for hobby and combine with frontend.
Who knows, maybe I will switch my role in future :)

Collapse
 
deciduously profile image
Ben Lovy

I'd say you can't go wrong either way, then, but Go is going to be easier to start with. It's always a matter of taste, but I personally have a lot more fun writing Rust than Go. Ideally, time permitting, you'd try both! Pick a simple application, try building it in both languages, and see which you prefer. Both are excellent choices.

Thread Thread
 
selengora profile image
Selen Gora

Yeah exaclty what I’m thnking about choosing sample project and do it with both. Needed to ensure both languages are capable of web development first. Thank you :)

Thread Thread
 
deciduously profile image
Ben Lovy

Shameless self-plug, but I wrote a post about getting started with simple framework-less webdev for Rust:

This is how you can do it without a framework, but you can also try Rocket, Actix-Web, or Warp for a more full-featured starting point. For Go, I'd recommend not starting with a framework at all. Just use the standard library, and only add in a third-party solution if your app grows to the point where you need it.

Thread Thread
 
selengora profile image
Selen Gora

Added to my reading list 😍
Appreciate for your help.