►
From YouTube: Hello, World
Description
No description was provided for this meeting.
If this is YOUR meeting, an easy way to fix this is to add a description to your video, wherever mtngs.io found it (probably YouTube).
A
So
hello
and
welcome
to
the
into
rust
tutorial
series.
My
name
is
Nicolas
Misaki,
so
I'll
be
your
humble
narrator
I'm,
a
member
of
the
rust
Corps
team
and
I've,
been
working
on
rust
since
around
2011.
So
the
into
rust
series
takes
an
ownership
first
approach.
Ownership
is
really
the
core
idea
that
makes
rust
into
rust.
It's
also
the
part
of
rust,
that's
most
different
from
other
languages,
so
it
can
take
a
little
getting
used
to
now.
This
tutorial
that
I'm
going
to
do
right
now
basically
gives
a
brief
overview
of
rust.
A
Syntax
starts
with
a
traditional
hello
world
example
and
proceeds
from
there
before
we
get
into
that,
though,
I'd
like
to
take
just
a
few
minutes
to
give
you
the
elevator
pitch
for
rust.
What
is
it
that
makes
rust
interesting,
so
systems
programming
has
long
been
one
of
those
with
great
power
comes
great
responsibility,
trade-offs
right,
C
and
C++.
Give
you
the
control.
You
need
to
get
the
most
out
of
your
computer,
but
they're
very
unforgiving.
Small
mistakes
can
easily
lead
to
catastrophic
consequences.
A
So
if
you're
lucky
you'll
get
a
crash,
but
otherwise
you
might
end
up
with
a
completely
unexpected
behavior
or
security
vulnerability,
and
this
is
why
systems
programming
has
come
to
have
this
aura
of
being
a
real
superhero
endeavor.
That's
where
rust
comes
in.
So
when
you
use
rust,
you
get
access
to
those
same
capabilities
that
you
used
to
get
with
C
and
C++,
but
now
the
compiler
and
the
language
have
got
your
back.
A
So
those
same
kinds
of
small
mistakes
that
used
to
lead
the
segmentation
faults
will
typically
lead
the
compilation
errors,
so
you
can
fix
them
upfront
now,
if
you're
new,
to
systems
programming,
that
means
rust
lets
you
get
things
done
without
having
to
worry
about
small
mistakes
that
are
going
to
bite
your
way
down
the
line,
but
rust
isn't
just
a
beginners
tool.
If
you're
an
experienced
systems
programmer,
then
rust
serves
as
an
enabler
rust
is
making
sure
you've
got
the
mundane
details
right,
so
you
can
build
cooler
more
powerful
programs
than
ever
before.
A
Do
you
want
to
paralyze
that
inner
loop,
no
problem
even
better,
if
you
or
maybe
that
new
person
you
hired,
is
still
coming
up
to
speed
accidentally,
introduces
a
data
race
down
the
line?
No
problem
rust
will
catch
it
for
you
now
I'm
going
to
get
to
the
main
tutorial
now.
But
if
you'd
like
to
hear
more
about
this
topic,
sort
of
why
rust
is
awesome,
you
can
check
out
the
why
rust
screen?
A
Now,
what
I'm
going
to
do
is
I'm,
going
to
start
with
the
hello
world
example,
which
is
basically
obligatory
right
and
then
I'm
going
to
go
from
this
example
into
a
lot
of
interesting
questions
about
how
rust
handles
memory,
management
and
safety
and
so
forth.
Now
here
is
the
first
snippet
of
rust.
This
is
hello
world
and
rust
and
I.
Don't
really
want
to
talk
about
it
here
on
this
slide,
what
I'd
like
to
do
is
go
over
to
this
other
website.
A
The
website
is
called
play
and
it's
actually,
where
we're
going
to
be
doing
all
our
exercises
in
these
tutorials.
So
if
you're
on
the
main
into
rust
website,
then
right
below
this
YouTube
video,
there
isn't
a
link
called
hello
world
for
this
exercise.
If
not,
then
you
can
see
the
URL
there
on
the
lower
left
of
this
slide.
So
what
I'd
like
you
to
do
is
click
on
that
link
and
it's
going
to
take
you
over
to
the
rust
play
website.
A
A
We
go
and
click
Play,
I'm,
sorry
run
I
you'll,
see
we
see
the
output
of
the
program,
hello,
world,
okay,
great
and
now
what
I'm
going
to
do
is
just
play
with
this
example
a
little
bit
too,
to
give
you
some
more
feeling
for
rust,
syntax.
So,
first
of
all,
you
can
see
that
rust
functions
are
defined
with
the
FN
key
word
so
and
that
the
main
function
is
basically
where
your
program
will
start
execution
and
inside
of
there
we
have
one
statement
which
ends
in
a
semicolon
and
it
calls
this
print
line
macro.
A
So
you
know
so
well,
I
call
this
print.
Yes,
it
calls
this
printed
macro
and
I'll
get
into
the
macro
bit
in
a
second,
and
this
will
basically
dump
something
on
the
screen.
So
this
exclamation
point
you
see
here
this
is
how
we
know
that
it's
a
macro
in
rust,
oh
macros,
are
things
that
expand
into
a
bunch
of
code
right
and
the
bang
operator.
A
The
exclamation
point
kind
of
signals
that
this
is
a
macro
expansion
and
the
reason
that
print
line
is
a
macro
and
not
just
a
normal
function
is
that
it
lets
us
do
some
kind
of
cool
things.
So,
for
example,
you
can
insert
placeholders
into
your
string
and
then
what
will
happen
is
they'll
take
for
each
placeholder
will
find
the
corresponding
argument
and
we'll
substitute
that
value
in
all
right.
A
So
here,
instead
of
writing,
one
hello
world
string,
I
wrote
hello,
placeholder
and
I
put
world
over
there
and
now,
when
I
run
I'm
going
to
get
the
same
output
that
I
had
before
now.
Normally
you
wouldn't
want
to
put
the
placeholder
the
normally
use
placeholders,
because
the
value
is
something
that's
stored
in
a
variable
or
something
that
will
change
in
different
executions.
So
we
can.
We
can
do
that.
Let's
make
a
variable
called
name,
and
this
is
how
you
declare
variables
in
rust.
A
You
write
let
and
the
name
of
the
variable,
and
now
you
can
optionally
put
a
type
here,
but
you
don't
have
to
and
usually
the
compiler
will
figure
it
out
for
you
all
right.
So
if
I
run
now,
I'll
still
see
the
same
output-
okay,
very
cool!
Now
here's
what
I'd
like
you
to
do,
go
off
on
your
own
and
do
these
exercises.
So
you
see
the
goals
listed
above
so
go
to
Ross,
tutorials,
calm,
slash,
exercises
and
click
on
the
first
link
to
hello
world
and
try
to
get
play
up
and
running
for
yourself.
A
Then
I'll
be
here
when
you
get
back,
don't
worry:
doo
doo,
doo,
doo,
doo,
doo,
doo,
doo,
doo,
doo,
doo
doo,
oh
you're,
back,
alright,
so
I
don't
know
if
you're
actually
left.
Maybe
you
just
like
my
singing
so
much,
but
if
you
did
good
and
if
you
didn't
that's
fine
too,
for
this
exercise,
but
I
do
really
recommend
that
you
go
ahead
and
do
the
other
exercises,
because
I
think
they
really
help
to
even
make
the
ideas
more
concrete.
Alright,
so
let's
go
on
I
want
to
go.
A
Make
this
example
a
little
more
interesting
and
introduce
a
helper
function
to
that.
I
use
the
FN
key
word,
then
the
name
of
the
function
and
then
I
can
give
a
list
of
parameters
with
their
name
:
and
then
the
type.
So
in
this
case
we
have
the
name
that
the
parameter
is
called
name
and
as
a
colon
and
its
type
will
be
string.
Okay
and
here
in
this
space
is
where
the
return
type
of
the
function
would
go
if
it
had
one.
A
So
if
we
returned
an
integer,
for
example,
we
might
write
arrow,
I
32
to
say
we
return
a
32-bit
integer,
but
we're
not
going
to
return
anything.
So
we
can
just
leave
that
off
and
then
I'm
going
to
move
this
print
Len
into
my
helper
function.
Okay
and
now
I
want
to
change
instead
of
calling
print
them
directly
I'm
going
to
call
my
helper
function,
so
everything
looks
good.
Let's
try
and
run
it.
What
happens?
Well,
I,
get
an
error.
Mismatch
types
on
this
point
so
what's
happening
here.
A
This
might
seem
a
little
surprising
what's
happening
is
that
the
capital
string
type
this
type
in
rust
doesn't
refer
to
just
any
old
string.
It
actually
refers
to
a
heap-allocated
buffer.
This
is
what
you
want
most
of
the
time
right.
So
basically,
rust
is
a
language
that
takes
memory,
allocation
and
resources
seriously
right
and
your
computer
has
only
finite
memory.
Usually
when
you're
working
with
strings,
you
have
to
allocate
some
memory
in
that
space
so
that
you
can
construct
the
string
in
that
memory.
A
Maybe
you
want
to
add
to
it
or
take
away
from
it
or
mutate
it
and
so
forth,
and
so
that's
what
the
string
type
represents.
One
of
these
buffers,
however,
there's
one
exception
to
that
rule
about
having
to
allocate
memory
and
that's
string
constants.
Those
can
be
pre
allocated
in
part
of
your
binary
so
that
we
never
have
to
allocate
and
free
them.
We
just
have
a
pointer
to
them,
and
so
they
have
a
different
type
to
reflect
the
fact
that
they
don't
need
to
be
freed.
A
So
what
we
can
do
to
bridge
this
gap
is
we
can
convert
between
those
two
types?
So
if
we
call
this
method
to
string,
for
example,
that
will
take
a
string
literal
allocate
a
buffer
and
memory
copy,
the
string
literal
into
it
and
now
I
have
a
capital
string
on
that
I
can
use.
If
I
run
this
code,
it
works
fine
and
in
fact,
there's
another
technique
that
I
use
a
lot
to
allocate
a
string
buffer,
which
is
to
use
format.
A
A
And
now
this
argument,
misaki's
is
going
to
be
inserted
in
spliced
into
the
string
neko
and
returned
into
a
string
buffer
to
yield
the
total
result.
Okay,
that's
cool!
Let's
go
back
to
when
to
world
okay.
Now
the
nice
thing
about
having
a
helper
function
is
I
can
call
it
twice
right.
So
let
me
add
a
second
column.
Let's
see
what
happens
here.
So
what
is
this
error
now
use
of
moved
value
name?