DEV Community

loading...

Discussion on: Why there seem to be less opportunities in Rust (right now) ?

Collapse
aghost7 profile image
Jonathan Boudreau

I don't think you can really justify, from a business perspective, the learning curve of Rust unless you're talking about replacing C/C++ (UB and memory safety make it worthwhile). Unfortunately the C/C++ world doesn't seem to move very quickly.

Unless you're in a tech hub its going to be very hard to find a job in Rust where you live. If you absolutely want to find a job in Rust you are probably going to have a better chance landing a remote position.

Collapse
yjdoc2 profile image
YJDoc2 Author • Edited

Yes Jonathan Boudreau, considering the business point of view I can understand what you are saying. Would it be correct to say that as Rust provides considerable benifits only when trying to replace C/C++, it is inevitably considered only in system programming related parts?
The only company who I have heard to be working majorly in Rust , is Oxide, which is aiming to create open source firmware , using Rust. Even then it is recently founded, so maybe, in general, it'll take quite some time for "large scale jobs" the be available in Rust 😌
Thanks for sharing your thoughts !

Collapse
aghost7 profile image
Jonathan Boudreau • Edited

Generally speaking, I don't think there is enough benefit yet for people to switch for web development. I wouldn't limit Rust's use case to just systems programming though. It has a lot of potential in desktop development (e.g., QT development), game development, and embedded.

Thread Thread
gklijs profile image
Gerard Klijs

Indeed, embedded seems to be the use case for some of the companies here in the Netherlands. But it will take at least 5 years till rust will be as viable as Java for web / microservices I think.

Thread Thread
aghost7 profile image
Jonathan Boudreau • Edited

It probably will ever really be used for web development with the exception of very niche, performance-sensitive use cases. This is what npm decided to do for a few of their services. In other words, Rust is already there when it comes to microservices.

Even if the ecosystem gets pretty big, Rust is a low level programming language. It makes it very obvious what is happening to the memory of the program, which is not something you care about most of the time when writing a web service.

Thread Thread
yjdoc2 profile image
YJDoc2 Author • Edited

Yes Jonathan Boudreau, even when I think of Rust in Web related works, Most advantages I can see are in type system and catching compile-time errors. There were few incidences where I called redirect on res object instead of req or incorrectly called a method on an object in python, which were only detected when I hit that route while testing. But with Typescript for JS, and introduction of type annotations for python, these advantages in Rust doesn't seem to give much benefits compared to cost.

Thank for sharing your thoughts Gerard Klijs 😄

Collapse
tofraley profile image
Taylor Fraley

I'd agree with that. Also a couple more points.

When you are talking about the web applications, there are a few considerations that may negate any advantage Rust might have.

As I see it, three big advantages Rust has are safety, speed and correctness. Most modern languages that have a runtime with a garbage collector, and that is safe enough for most web app/service projects. Most languages run fast enough for most projects. And, to be honest, many people don't seem to care much about how helpful their programming language is at enforcing correctness.

Businesses care about other things as well. The reason there are more internships in JavaScript, PHP, Python, Java, etc. is because those languages have huge communities. Large communities mean a large talent pool. Those languages have been applied toward the web domain for a lot longer than Rust. They have a large ecosystem of libraries dedicated to solving problems in that domain. They have many many experts in that domain. Rust is just getting started (although it's picking up speed).

Look at how Go is making so much ground in the same domain, with only a small head start. Go was designed to make development easy, including concurrency. In contrast, Rust's design is focused more on providing high performance and safety.

For now, you see Rust being used where companies think they will get significant benefit out of using it.

Collapse
yjdoc2 profile image
YJDoc2 Author • Edited

Taylor Fraley, I can definitely understand what you're saying about the use of Rust in web. As of my knowledge, there are two "prominent" frameworks for web in Rust, Actix Web and Rocket, and out of them Rocket uses rust nightly, which can be a high risk in production (I saw a talk by creator of Rocket, saying he can't understand how some companies are actually using Rocket in production)
I'd say safe concurrency is also one of focusses of Rust, but maybe the cost of learning is high for the general use, whereas Go provides it without much difficulty, at tread off of having a GC , which , as you said, is decent fast for most applications.

If you know, can you give some examples of in which domains companies might be currently using Rust?
And thanks for sharing 😊

Thread Thread
tofraley profile image
Taylor Fraley

These are just my own observations. Some of these are from actively monitoring jobs at companies that are actively using Rust :). Some of them are companies/projects that have written about it. There are a few domains I've seen take a fair amount of interest.

Blockchain / Web3 - Parity (and anything that builds on Substrate or Polkadot), NEAR, Protocol Labs (IPFS/Filecoin/libp2p), Libra, Purestake, Chainlink
There seems to be a lot of interest in Rust in this space.

Various kinds of Distributed Systems - Kraken, Dropbox, NPM, Fastly, Cloudflare, Red Canary, Microsoft
Kraken is the one company I've seen that seems to be putting a lot of active effort behind using Rust for a lot of things, including microservices and desktop GUI development. Many are more like Dropbox or NPM, where they built/rebuilt some major system in Rust with success. Fastly has been working on webassembly based edge computing using Rust. 1Password has a project to build their core functionality into webassembly modules to make them reuseable.

There are probably plenty more that are experimenting with it in some way.

There are other domains where there is plenty of interest, just not mass adoption. Game development (Embark Studios), embedded development, and DevOps tooling (FP Complete) are good examples.

Thread Thread
tofraley profile image
Taylor Fraley

Oh, I forgot to mention this.

First, I am pretty sure Rocket no longer requires nightly. That's a pretty recent change.

Second, there are actually quite a few really good web frameworks.

But the point you made is still VERY true. Everything in the space is so early in development that it seems pretty risky to use it in production.

Collapse
aghost7 profile image
Jonathan Boudreau

I don't think Go is a good comparison since it has a much larger company backing it. I would attribute most of its momentum to the marketing it has had from the beginning.

Kotlin is a bit closer, but it relies on the existing ecosystem (Java) more than Rust to make adoption easier. Rust can call C/C++ but you normally want to write a wrapper, versus with Kotlin you can more or less just import the Java library.