►
Description
From the Rust Berlin's January "Rust and Tell" Meetup (https://www.meetup.com/Rust-Berlin/)
Olivier Goffart: https://github.com/ogoffart
Hosted at Prisma: https://www.prisma.io/
🎥 Filmed by iStream: http://www.istream.pl/
A
So
let's
talk
first
about
myself,
so
I
walk
forward
books,
so
basically
I'm
a
C++
developer
and
I
earn
my
money
by
basically
consulting
and
contracting
for
consumer
working
with
C++
and
mostly
on
the
Qt
framework,
because
I've
been
working
with
a
kid-free
mode
before,
for
example,
recently
I
was
working
actually
as
a
contractor
for
the
kid
company
to
work
on
the
cute
for
microcontroller
project.
So
this
this
is
relevant
for
this
talk
in
a
way,
but
I
mean
this
different
kind
of
medical
controller
and
it's
in
C++.
A
So
but
so
the
point
is
that
in
my
free
time,
so
I'm
not
paid
yet
to
do
some
work
but
I'm
a
free
time,
I
like
to
to
develop
an
arrest.
So
I've
learned
myself
first
because
I
think
it's
a
cool
language
act
that
has
good
potential
as
other
sleepers
particular
has
see.
Some
some
potential
there,
so
I'm,
basically
like
you
know,
must
have
been
doing
a
few,
create
like
an.
A
A
So
what's
what's
there
on
this
program,
yeah,
so
I
came
to
this
meetup
quayle,
quite
a
fan
already
and
there.
So
today
there
was
no
quiz
in
fortunately,
but
most
of
the
time
there
has
a
quiz
and
one
of
the
prize
is
this
little
thing,
this
little
micro
controller,
so
III
wonder
quiz
the
know-how
so
I
got
this
I
got
this
this
this
little
thing
and
I
thought
you
guys
might
as
well
do
something
with
it.
So
there
was
a
real
explanation,
cab
with
what
what
it
is.
A
I
lost
the
cab
but
I
kind
of
took
some
notes,
and
so
it's
basically
it
says
it
has
a
an
ARM
processor.
So
it's
a
cortex
m4
and
for
with
one
hundred
megahertz
and
it
has
200
256
kilo
kilobyte
of
harm.
So
this
is
less
than
the
microcontroller
had
been
working
for
kid
because
they
had
like
a
big
screen.
It
had
up
to
even
ten
megabytes
of
hands,
but
so
anyway,
I
thought.
Okay,
let's,
let's
try
to
do
some
hast.
There
I
got
this
thing
at
the
hospital
I.
A
A
Okay,
what
do
I
need
I
mean
chip.
Okay,
done
computer
running
one
of
the
system.
Well,
I
have
a
Phoenix
I
hope,
that's
gonna,
be
okay.
Wait
as
your
subscription
yeah
I
forgot
to
mention
that
those
thing
are
kind
of
sponsored
by
Microsoft,
but
okay,
so
I.
We
need
to
subscribe
to
a
zero
and
then
do
something
and
I
mean
that's
kind
of
okay.
I
can
play
this
thing
cable
here.
A
A
How
to
let's,
let's
forget:
how
to
do
custom
embedded.
A
A
A
So
I
basically
need
to
have
a
rest
up
and
I'm
having
a
cortex
m4,
so
I'm.
Just
using
this
comment,
I
mean
you
need
to
increase
the
font.
Yes,
so
if
you
have
any
questions
or
comments,
just
please
speak
so
yes,
so
that's
the
thing.
We
need
to
install
host
for
the
target
so
because
it's
a
ARM
chip,
so
we
need
to
have
the
signal,
library
and
everything
compiled
for
this
target.
So
we
just
crossed
up
to
this
target
I'm
on
Linux
I'm,
an
option
next
so
I'm
gonna
answer
this.
A
A
A
So
this
is
basically
I'm
using
this
gdb
server.
So
this
this
program,
open
OCD,
started
a
server
on
localhost
on
which
I
can
connect
and
then
I
connected
in
gdb
and
then
then.
Well,
there
are
some
programming
there
that's
running,
but
we
know
nothing
about
it.
So,
let's,
let's
build
some
program
for
it.
A
B
A
C
A
A
A
A
A
A
A
C
A
Really
happens
but
I
had.
Apparently
there
was
an
infinity
infinite
loop
there,
but
that's
fine,
that's!
Basically
what
the
program
was
doing.
Okay,
first
step
done,
so
it
doesn't
do
much.
What
can
we
do
with
this?
So
we
have
a
few
a
few
bad
terms.
There's
a
few
LEDs
there.
Others
claim,
first
whatever
and
by
the
developer,
does
is
to
make
a
blinking
LEDs.
A
A
A
So
those
those
credits
have
kind
of
auto-generated
from
some
description
files
provided
by
the
manufacturer
of
the
CPU,
and
it
has
all
the
it
in
expose
all
this.
Those
addresses
instead
of
like
in
know
in
embedded
software,
you
will
just
unsafe
and
then
cast
some
numbers
to
some
address,
but
it
it
gives
names
to
them
and
there's
one
one
important
so
there's
different
modules
for
different
models,
and
basically
the
entry
point
is
this
peripherals
data
structure
which
contains
all
of
all
of
the
peripherals
and
the
only
the
only
safe
way
to
get.
A
Is
you're
interacting
everything,
but
the
so
we're
just
going
to
take.
Take
this
peripheral,
so
it's
gonna
return
and
an
option
because
only
the
first
call
to
it
will
return
something
and
the
second
call
we
had
to
enormous.
So
here's
the
first
call
on
man
we
can
under
what.
But
what
what
this
means
is
that
there
would
be
only
one
very
various
for
the
whole
on
the
whole
project.
And
if
you
need
to
pass
a
few
failures
to
some
sub
function,
you
can
move
them
out
home.
A
A
And
ho
behold,
and
so
we
have,
we
have
a
few
buttons,
and
so
we
see
how
those
buttons
are
connected.
So
here,
for
example,
we
have
one
one
big
LED,
which
has
it's
a
multi-column
LED,
but
it's
actually
three
LED
which,
like
blue
red
and
blue,
and
then
there
is
a
few
more
LEDs
on
the
sides
which
have
been
one
by
one
and
what
this
data
sheet
is
telling
us
is
well
where
the
thing
is
connected.
So
if
we
zoom
in
we
see
that
the.
C
A
Led,
for
example,
is
connected
to
B
pb4.
So
what
does
PB
for
means?
It's
basically
the
the
port
before,
and
this
corresponds
to
some
GPIO
and
so
GP
a--.
I
also
didn't
know
that
I
just
I
just
try
to
try
to
find
that
out
and
then
by
searching
I
found
that
so
GP
I
do
I
oh
stands
for
general
purpose:
input,
output
and
in
all
in
our
data
structure
here
and
peripherals,
we
have.
We
have
some
some
of
those
GPIO.
A
A
Yeah,
yes,
I'm,
the
it's
the
it's
the
white
one,
I'm,
not
the
lightest,
which
is
due
because
the
other
one
is
invisible.
But
let's
go
back
to
our
main
program,
and
so
this
GPIO
is
then,
can
we
split
into
each
individual
components?
So
the
write
the
letter,
the
red
LED
was
connected
to
B
before
so
we
just
ask
for
the
bit
before
thing
and
I
would
only
like
to
have
the
documentation
of
this.
A
A
Right,
okay,
but
basically
with
a
when
you
have
microcontrollers,
basically
a
lot
of
things
connected
to
those
pins
and
the
pins,
they
can
either
be
input
or
output
or
and
even
when
the
inputs
they
can
be
analog
or
digital,
and
you
need
to
configure
by
setting
some
other
values
to
some
other
registers.
To
tell
no
this
this
pin
is
going
to
be.
It's
me
is
meaning
that,
and
the
way
to
do
that,
usually
in
C,
is
that
you
just
write
some
value
to
some
register.
A
You
have
to
make
sure
it's
the
right
value,
and
then
you
can
use
the
pin
as
a
you
can
either
read
from
it
or
quite
to
it
to
this
register.
But
what,
where
does
the
heart
model,
of
course,
is
being
safe
and
you
it's
in
the
type
system,
so
I'm
I.
Unfortunately,
this
documentation
is
kind
of
them
not
there,
but.
A
A
A
A
A
C
A
A
A
A
A
A
A
A
We
can
create
an
ice
I
C
device
because
it's
kind
common
kind
of
comments,
so
they
have
abstraction
for
that
and
we
get
we
give
them
the
the
p
p8
and
p9
and
a
few
other
configuration
that
just
took
the
default
stuff
from
the
example
from
the
the
screen
driver
and
then
we
can
connect
with
i2c
and
we
get
a
graphics
mode,
and
that
comes
from
the
embedded,
graphics,
credit
and
this
basically
a
lot
to
do
a
few
field.
Holding
I'll
keep
my
loop
here.
So
let's
try.
C
A
So
we
have
so
that's
what
we
do.
Basically,
we
do
three
lines:
three
lines
to
make:
a
triangle
we
rectangular
in
with
all
a
circle.
So
we
have
that
and
horses
thing.
So
that's
basically
what
I
need.
So
that's,
basically
what
we
need
to
get
to
get
some
more
complex,
little
game
working.
Then
again,
I'm
gonna
just
copy
paste
for
this
thing.
So.
A
A
A
A
A
So
yeah,
and
so
basically
what
what
is
this
is
basically
just
a
loop.
We
look
at
the
value
of
this
button
and
this
pin
if
it's
a
high
or
low,
we
check
that
we
don't
press
two
keys
at
the
same
time
and
we
kind
of
do
that
in
a
loop
because
we
want
to
I
mean
a
frame
is
a
bit
short
to
just
press
at
the
right
moment.
A
So
I
I,
let
I
make
it
I'll
type
two
hundred
times
and
I
checked
two
hundred
times
whether
one
has
press
on
it
and
then
I
can
just
it's
just
some
basic.
So
the
snake
is
basically
just
some
data
structure
which
has
like
so
it's
it
doesn't
really
use
malloc
or
anything
it.
It
pre
allocates
a
list
of
points
and
then
it's
going
to
hold
em
one
by
one.
So
that's
basically
I
just
need
to
know
where,
where
is
malleable
and
and
and
whereas
what?
Where
is
my
snake
yep?
B
A
So
I,
don't
I,
don't
actually
did
myself
that
I
will
assume.
There
is
so
so
this
is.
This
is
using
as
I.
Don't
remember
if
I'm,
if
I
mention
this,
but
this
is
using
no
operating
system
whatsoever.
So
it's
just
running
so
this
is
the
operating
system.
So
I
have
this
new
snake?
Is
the
operating
system.