Why Rust is NOT a Passing Fad...

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
is rust just another passing fad language like a lot of the sea crowd would have you believe I've been in the industry for 30 years now and every couple of years some language comes along and it threatens C and then it goes away rust is just another one of those languages well I don't think so yes it's a hard language the syntax is kind of ugly and the borrow Checker is constantly slapping you in the face and there are few developers who actually get through the initial excitement of learning rust in addition I know there are lots of jokes out there about rewriting things in rust there's lots of memes lots of discussion on Reddit in places like that and the C and the C++ people hating on it as if for some reason they see it as a threat as if it can't be another tool in the toolbox but to me it is not a passing fad or a new modern language that's going to die off in a few years first regardless of all those jokes all of the things everywhere are being Rewritten in Rust largely for performance reasons I can't tell you how often I see some new major version release in an app and there being some statement in it about part of the app being Rewritten in Rust recently Tailwind announced 4.0 which is in Alpha stating that they have migrated the most expensive and parallelizable parts of the framework to rust Microsoft as we know is rewriting core Windows services and the M365 core platform in Rust I talk about that in this video I'll link to it above Google is pushing rust to Android Dropbox is rewriting part of their codebase in Rust and a while back Discord announced that they were switching from go to rust for performance reasons for performance enhancements a WS firecracker was released and was written in Rust and allows you to launch a micro VM in like 125 milliseconds another example is there's this awesome replacement to the python pip tools called UV which is a tool created by a company called astral their goal is to make UV a cargo for python cargo being rust's build system and package manager making a cargo basically for python it's 10 to 100 times faster in installing python packages setting up virtual environments Etc and it's guess what written in Rust here's some benchmarks in a medium article cold installation is 8 to 10 times faster warm installation is 80 to 115 times faster then there's a little demo here actually creating a venv a virtual environment is about 80 times faster and here's a demo here installing the Transformers package you see here on the left they do a pip install Transformers and it goes on its way this is what we normally see but look over here on the right activate the virtual environment install Transformers look how quick this is Boom done indeed the speed difference is Crystal Clear will people stop using pip who cares we'll continue writing python with this new tool in the kubernetes space people are choosing a rusty Linker D service mesh over a go powered ISO speaking of Go versus rust there's a cryptocurrency by the name of Caspa which is a proof of workchain they rewrote their codebase from go to rust which enabled them to reach 10 blocks per second they couldn't do that with go they achieved it with rust 10 blocks per second and that of course allows for greater scalability and throughput potential transactions go up to 3,000 transactions per second they couldn't reach this with go and I'm not saying go is bad by any means but when companies need that Peak Performance and safety they look to rust they're rewriting things in Rust and when people like Microsoft and Google in Dropbox in Discord in blockchains like Casper and like Solana get heavily involved in Rust they see some kind of long-term benefit there else they wouldn't do it why go and rewrite all this stuff in Rust if you think it's going to go away in 10 years so regardless if it's the right call or not for all these companies people are rewriting their services or part of their services in Rust and they're benefiting greatly from the speed and the safety and that's a big deal here yes you can get these speeds with C of course nobody said you couldn't but what rust relieves you of is doing the memory management manually and yes I know that's opinionated but the studies are showing that it's safer vulnerabilities created from managing memory manually are common with rust you don't have to manage it manually rust has his own way of doing it but that presents a much safer alternative without giving up performance now the trade-off of course is that rust takes longer to write but we'll actually see that challenged here in a minute and there aren't a ton of developers well-versed in Rust because it's a very different language and sadly for you and I most of the rust job openings are only seeking those super experienced devs I want to learn rust I want real world projects but I can't get real world projects until I land that job that requires me to have tons of practice so here's an interesting article that one of the members of The Imposter devs Community John shared shout out to John and by the way check out the Imposter devs Community we have weekly events on demand recordings and teachings and is a great way to fill those gaps in your learning in a community setting I'll put a link to that below echoing the past two years of rust evangelism Google reports that rust shines in production to the point that his developers are twice as productive using the language compared to C++ speaking at the Russ Nation UK conference Bergstrom said that while Dropbox in 2016 and figma in 2018 offered early accounts of writing code in memory safe rust in doubts in productivity and the language have subsided concerns have lingered about its reliability and Security even 6 months ago this was a really tough conversation I would go and talk to people and they would say wait wait you have an unsafe keyword this means we should all write C++ until the end of time but there's been a shift in Awareness across the software development ecosystem about the challenges of using non-memory safe language so I'm sure you've heard this I have a video on it as well there's been a big government statement about memory safe languages c not being one of those and the push to start rewriting those programs in memory safe languages of which rust seems to be the safest and the fastest so again we talked about this in the last video Microsoft Azure CTO argued that software projects that might have been started in C or C++ should use rust instead earlier this year Microsoft put out a call for developers to help Port its own C code to rust but what I want to get at in this article is down here no loss in productivity quite the opposite at the Chocolate Factory which is the company this guy works at turning go code which is considered memory safe go is also memory safe but not as performant into rust has shown noteworthy benefits when we've Rewritten systems from go into rust we found that it takes about the same size team about the same amount of time to build it that is there's no loss in productivity when moving from go to rust that's interesting because go is much easier than rust in my opinion and the interesting thing is that we do see some benefits from we see reduced memory usage in the services that we've moved from go and we see a decreased defect rate over time in these services that have been written in Rust so increasing correctness more significant is the comparison of rewrites of C++ code into rust in every case we've seen a decrease by more than two times in the amount of effort required to both build the services in Rust as well as maintain and update those Services written in Rust and so that's a really huge thing for us because C++ code is very expensive these are large teams it's a lot of work there's a lot of risk a bit more than half of his developers say that rust is easier to review when we sort of look into why that is we get sort of the most incredible question of the survey the one that kind of blew us all away which is the confidence that people have in the correctness of the rust code they're looking at so in comparison to code in other languages how confident do you feel that your team's rust Cod is correct the answer Bergstrom said was 85% that's a massive number I cannot get 85% of this room to agree that we like M&M's M&M's rust same thing so rust devs aren't any slower than C++ devs now I have to say I have to qualify this whole thing here by saying that rust isn't the answer to everything I personally would not choose rust to build websites it can it'll be fast but there are better tools for the job at the moment rust is first a systems programming language and second all those other things especially with this nice wasm support so I'm not saying that rust is the answer to everything I'm just saying I don't see it being a fad for the who think it is what about zigg I get lots of comments saying what about zigg zigg is great and they can both exist what about Mojo well Mojo is great it's fast just nobody's using it so based on all of this adoption these major Services by big players being Rewritten in Rust the safety that it provides at no loss of speed and the benefits that the companies are seeing from this I don't see this as a fan what do you think do you think rust is a passing fad do you even like rust is it an ugly language do you use it for anything let's discuss below down in the comments if you found this video helpful give it a thumbs up if you haven't subscribed to the channel what are you even doing hit that subscribe button and I'll see you in the next video
Info
Channel: Travis Media
Views: 30,994
Rating: undefined out of 5
Keywords: rust language, rustlang, learn rust in 2024, rust adoption, rewrite in rust, rust and microsoft, rust programming language, rust and google, tailwind rust rewrite, tailwind 4.0, rust and c++, rust memory safety, memory safety, rust programming, systems programming rust, tailwind css 4.0
Id: GCoANs1jRC0
Channel Id: undefined
Length: 8min 53sec (533 seconds)
Published: Sun Apr 07 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.