Let me tell you a little bit about what Rust is about.
Rust is a secret weapon.
Rust is a community project.
Rust has learned from the mistakes of the past.
Rust is a systems programming language that is
safe, concurrent, and fast.
I've got one word for you: Rust.
Asking your programmers to
write security-sensitive software in a
language from the 1960s is
like asking your dentist to go back to
using the tools that they had at the
turn of the last century.
You know, we have this constant stream
of security vulnerabilities being
reported on the internet. Every week
there's a new crisis, and almost all of
these are due to flaws in the
construction of the software.
And that's because C++ doesn't really give you that
many safety checks. In order to do it at all
you have to understand everything.
If you don't understand everything, then you
may make some kind of mistake, and that
kind of mistake would compromise the
entire program.
And Rust as a language
was designed to solve a lot of these
problems, or at least to alert you to
them as soon as you write the program.
And I was always rather skeptical that
this would actually be possible, or that
this would be really useful to me as a
sort of non-research-y systems programmer,
but the thing that really turned me around was
actually writing Rust code myself, and realizing
that I would write some program,
and I would think it would be totally correct,
and then I would compile it, and the
compiler would instantly tell me like "uh-uh-uh...
you forgot this case."
It'll say, "No. You shouldn't do it that way.
This will end poorly." And it won't let
you go on until you've made it right.
That kind of instant checking and
instant feedback is just so valuable.
The sooner that you detect an error, the
less it costs you.
Another thing that
makes Rust accessible in the system
space, compared to existing systems
languages, is that it's very modern.
So Rust comes out of the box with a
package manager called Cargo a central
library ecosystem.
Cargo makes it absolutely easy to start a new project
in Rust, to deploy that project to crates.io
To make use of other third-party projects
that exist in the crates.io ecosystem.
This is something that
high-level languages like Python or
JavaScript take for granted, but it's a
pretty powerful addition to the systems
programming world.
So, manual memory management is something that
a lot of people have never really experienced in
terms of they're programming in Ruby, or
JavaScript or Python, and they just kind
of had this garbage collector take care of it.
When a language cleans up after you
it has to stop, look through all of the
memory, and decide what is and is not in-use.
And the time it goes through to
free up what's not in use anymore
is called a garbage collection pause.
In a garbage collected language, you
really can't get away from that pause,
and it becomes visible to the users if
you're running garbage collected code on
sufficiently low power hardware, like
a cheap phone.
But having this ability to manually control what resources you have
allocated allows you to write in all
these really esoteric and interesting
environments.
You don't have to bring along this
entire garbage collector, or this big run
time, but rather you're very lightweight,
and you can integrate with anything, and
basically anything that exists.
Rust is enabling because it provides
zero-cost abstractions.
A lot of the new features that have come along in
programming languages usually have some
kind of costs associated with them, right?
Like they can give you extra security
checking, but your program's going to run
a little bit slower.
The concept of Rust is giving you the same abstraction
in terms of what you program against, but
there's no cost. At compile-time
everything goes away and it all gets
down to the bare metal of what you would
have written anyway.
Basically they impose no overhead
over what you might write by hand.
By having this gradient of
low-level and safety, you can have more
developers able to dive down into the stack.
And they find that actually
when they get involved with a project
with written and Rust, there is really no
limit to the kinds of things that
they're able to work on.
One debate you hear
a lot about these days is between
web applications on the one hand, versus
native apps, and there's the sense that
it's very hard for web apps to compete
with the performance and responsiveness
of native. We see a future where you can
use things like asm.js as a way of
compiling Rust code side-by-side with
code you're writing in JavaScript.
So you write the majority of of your app in JavaScript,
the most performance-critical bits in Rust.
Rust gives you great safety guarantees
that are you know similar to
what you get in JavaScript, so your app
isn't crashing all over the place like
it might be if you were trying to do
this with C++ but you do the whole
thing on the web platform. So that
that's one way we see Rust helping
the sort of battle between web and native apps.
This concept of working at
this low level has been reserved for the
select few in the past...
these Wizards behind the curtain.
We can welcome a whole new generation
of systems programmers.
All of a sudden you can write this super high-performance code
and it doesn't break.
An exciting thing for me
has been seeing as one by one
engineers at Mozilla start to give Rust a
try and really fall in love with it.
Come to rust and you feel like you
suddenly have superpowers.
I love Rust.
Congratulations on starting Rust.
Go try Rust.