Check out a free preview of the full The Rust Programming Language course

The "Wrapping Up" Lesson is part of the full, The Rust Programming Language course featured in this preview video. Here's what you'd learn in this lesson:

Richard wraps up the course by summarizing why someone would want to use Rust, providing additional resources for continued learning, and answering some student questions. Student questions regarding next project recommendations, where Rust is best applied, if Actix is a good framework for Rust, and what the job market for Rust looks like.

Preview
Close

Transcript from the "Wrapping Up" Lesson

[00:00:00]
>> So we've talked about rust as a language empowering everyone to build reliable and efficient software. And hopefully over the course of the workshop, you've gotten a sense for what that means. So reliable means that basically, either it's going to compile in which case it's going to have very low overhead, or if there could be a potentially serious problem the compiler is going to tell you about it.

[00:00:16]
Now granted, this can be a little bit less convenient than languages that will use something like a garbage collector to take care of this for you. But that gets into the second piece of this which is efficient. It's basically a language that's really focused on having as little overhead as possible so that it can compete with like C and C++.

[00:00:31]
We've seen that it's memory layouts, it's basically using the absolute bare minimum they can possibly get away with. And using these compile time things to to compensate for that, to make sure that you're not having to do manual memory management, to get that same level of efficiency that you'll see and see.

[00:00:47]
We talked about Russ compiles to either machine code or web assembly. Honestly, the main difference between here is just going to be what your size of your sizes is going to be eight bytes, or four bytes, depending on whether it's a 64 bit or 32 bits target.But otherwise, all the stuff that we learned in this course today.You can use this to build web assembly programs.

[00:01:04]
So we didn't get into exactly how to do that. But there's tutorials on doing that. And it's honestly not a ton of work. Talks about a bunch of different people who are using Rust organizations, of all shapes and sizes and they're using it for all sorts of different things.

[00:01:15]
One thing that they all do have in common though, is that these are all use cases where performance really matters. And that gets us into sort of the the three main reasons I would say you want to use Rust which is speed, performance and going real fast. As you can see, Rust goes to some pretty great lengths.To try and give you an experience where you're building reliable software, but also that software goes as fast as the hardware will let it just about.

[00:01:39]
And finally let's wrap up with some additional resources that so as I mentioned, right Rust is a very big language. I wanted to focus on basically helping you out as much as possible with, Baro checker errors because I know that's typically cited as the most common source of frustration and confusion for beginners.

[00:01:55]
So I think it's like, the most useful thing I could do for you and a one day workshop, is to get you as comfortable as you can possibly be with a mental model of like what are these Baro checker errors actually mean. So that you're not, looking at these things and looking at all these new words and sort of struggling with them.

[00:02:10]
But, there's plenty more to the language, we talked about traits a number of times, there are questions around that.Closures, macros, there's plenty of other stuff in the language to learn but fortunately.Most of the other stuff has an closer analogues in other languages. The stuff we learned today is really the most rust specific stuff.

[00:02:27]
So when you encounter traits, you'll probably be like, yeah, this reminds me of something. I've used another line language. Same thing with macros. Same thing with closures and to some extent. So, some additional resources. Definitely if you go to rust lang.org slash learn. They have a complete, tutorial.

[00:02:42]
It's like very comprehensive, very well written that has all sorts of that takes you through the entirety of the language. And hopefully the mental model that you built up here would be useful when going through that. They also rust-lang.org/community which has links to places you can like chat and posts.

[00:02:57]
Ask questions. Rust community is like pretty famously beginner friendly. There's a lot of people willing to help people answer the questions. I've definitely posted on their Discord server and gotten some help when I was starting out, so definitely recommend that. Also if you're looking for the language server protocol extension that I was using in VS code, this is where to get that that's called rust-analyzer.

[00:03:20]
And finally, if you want to see a more detailed example of a rust program.Inside the lessons directory in this workshops repo, actually built a little static site generator in rust, which is actually used to generate the companion site that goes with this website. So if you wanna see a rust program that is like not trivial, but also not particularly big.

[00:03:40]
That thing does use some concepts that we haven't talked about in the course of this course. I did add some comments in there so you can kind of if you want to read through that code, it'll give you a little bit of a hint of what's going on in there.

[00:03:51]
With the things that we didn't cover here, but that might be a nice little like, next stepping stone, looking through that code, trying to understand what it's doing. And you'll definitely spot a lot of the concepts we did talk about in the course of this course. And it's there's like a little nice meta aspect to being able to read the code for the companion website to the course.That you wouldn't have been able to read before going through the course.

[00:04:11]
Okay, and that wraps it up. Thank you so much for attending and if you have any last questions, please feel free to ask.
>> I guess my question would be kind of like next steps, I definitely wanna take a look at that lessons. Directory you're talking about but in terms of like project applications, are there any.

[00:04:34]
Like for me I kind of struggle with building a project if I don't really know the full scope of the language so. Is there anything you would recommend? Like building that would really help someone grasp rust and rust in its entirety?
>> That's a good question. To be honest, I don't know if there's like any one project that would satisfy that.Because there are so many parts of the language that are somewhat specific to certain niches.

[00:04:57]
For example, there's like sort of a whole subset. Section that all has to do with concurrency. If you ever hear about like people talking about like a sync await and stuff that was a big deal for a while and still somewhat of a hot topic.But that only really comes up if you're doing stuff with concurrency, which you might not care about at all depending on what you're building.

[00:05:16]
So concrete advice. I actually think if you go to rustling.org/learn, they have, it's not just like a tutorial.That's like the main thing that's there but actually they list a couple of other different like ways you can go. With your next step so some of them they have like little exercises.

[00:05:30]
I think there might even be some like project ideas in there, haven't been there a while.But I would recommend going there as the next step or just looking through the static site generator in the repo.
>> Yeah, I'm afraid your element action book and I really loved that that approach and I realized that ,It was hard to do here, because it's just such a large language.

[00:05:49]
So we just couldn't do an inaction approach, really. But yeah, I'm just wondering if you have any specific sort of thing, like, certainly I could look at rustling, rustling learn, but maybe something that's performance critical, or is there any sort of thing like, involving. Like web assembly or something that for like a front end developer where they'd say, you know what, I think rust would be really good for this sort of thing.

[00:06:13]
>> Honestly, the main example that comes to mind is games. Games are always performance critical because if your game is leggy, it's not gonna be fun. [LAUGH] And also, like games tend to be like, the more performance you can throw out them, the more stuff you can have on the screen at once.

[00:06:26]
Not just graphics, but also like, number of like characters or whatever else. So I would say if you're into games, that's probably a pretty good place to look. Because you can do some cool stuff there. Also anything to do with like simulations or visualizations. Again, those are both areas where like, the more things you have on the screen at once like potentially.The more valuable the thing is, but you get constrained by performance at some point.

[00:06:51]
So that's three areas that come to mind. Yeah, by the way, I guess I should have said that I'm the author of element Action but also, if you wanna learn, [LAUGH] Elm for me on front end masters.I have both a beginner Elm course and an advanced Elm course.

[00:07:05]
It's way easier than Rust. [LAUGH] At least, that's my opinion. But also that's like everybody's opinion. Who knows both? I would say.
>> Have you heard of Actix? Is it still a good choice for first web server framework?
>> Good question. I have heard of Actix. So actix is a way to do web servers in rust.And actix is famous for two things One is that it was basically being at the top of like the tech and power benchmarks for like fastest.Like web servers even like beating out like c++ ones and stuff like that, which was considered a really cool milestone for Rust.

[00:07:44]
But it's also known for a second thing, which is there was a lot of controversy over how it did that.Because in a lot of cases, it was using a lot of like unsafe code and doing basically things that are sort of like. Not turning off the borrow checker since you can't do that, but basically, sort of doing things closer to manual memory management.Using things that like Rust lets you do, they're generally intended to be used with mainly with like, C type things.

[00:08:08]
And so people felt like it was, a lot of people felt that it was sort of outside the spirit of Rust to do it in this way. There became a whole big kerfuffle about that. And I think the maintainer ended up like walking away from it and there was there was a whole.

[00:08:21]
There's a lot of drama there that I'm not exactly up on. But so long story short is, I have not personally used it. So I certainly would not recommend it. But I do know that it has a reputation for being very fast, but also there was a big controversy.

[00:08:33]
So I guess I would say read up on that. But there's plenty of alternatives that are also plenty fast and not controversial. So maybe you might wanna look into.One of those like work for example.
>> Someone's asking about the job market for rust?
>> Job market for rust.

[00:08:49]
So I have a friend who recently was looking for a rust job. And I would say that the number of job openings was pretty small, but actually they did end up getting a rust job so definitely seems possible. But I, I would expect it to be significantly smaller than death like this really like the JavaScript job market, which is of course enormous.

[00:09:15]
Having said that, I also don't know how much that depends on your background. Like I wouldn't be surprised if a lot of rust jobs are involved in taking like an existing C or c++ code base.And trying to move it to something more maintainable, like rust. In which case they might actually expect, like hey, maybe you don't have years of rust experience, but maybe they are looking for years of C or C++ experience.

[00:09:36]
Having said that, that's pure speculation on my part. I've never actually tried applying for rust jobs. So I can't speak from firsthand experience when it comes to that.. Al lright, thank you all so much for coming.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now