►
From YouTube: Debugging WebAssembly - Iryna Shestak
Description
From the Berlin Rust's October "Rust and Tell" Meetup (https://www.meetup.com/Rust-Berlin/)
"Rust and Tell“ is a monthly event to share ideas, and learn about new things in and about Rust. Meet fellow Rustaceans, share your learnings, get motivated and inspired. We’re open to any and all kinds of talks about any subjects that you think will be interesting to an audience interested in Rust. Whether you're an experienced Rust developer or just getting started, we strongly encourage you to share your learnings.
Iryna Shestak: https://twitter.com/_lrlna
Hosted at Prisma: prisma.io
🎥 Filmed by iStream: http://www.istream.pl/
A
I'm
gonna
talk
about
debugging
was
I'm.
Sorry
I'm
supposed
to
go
first,
but
I
forgot
my
bike
lights
at
home
and
I.
Couldn't
bike
on
pencil
away
without
bike
lights,
cuz
I
think
that's
a
suicide
mission,
so
I
had
to
like
take
a
cab
and
that
took
such
a
long
time
anyway.
I'm
here
and
I'm
gonna
do
the
last
talk.
I
have
a
debugging
wisdom.
My
name
is
Irina
spelled
with
ours
on
ELLs
and
set
of
eyes
on
Twitter,
because
I
didn't
have.
The
other
name
was
not
available.
A
B
A
I
write
JavaScript
in
rust
at
MongoDB,
mostly
javascript
by
the
past
couple
of
months
or
the
past
year
or
so
I've
played
around
with
rust.
This
talk
is
a
little
bit
of
rest,
but
mostly
about
azam
and
how
to
work
with
wasone
when
you
compile
that
down
to
rest
I'm,
just
kind
of
like
a
brief,
probably
15-minute,
talk
we'll
see
how
it
goes.
I
kind
of
hacked
this
together
from
a
previous
talk
in
like
the
last
30
minutes.
A
The
rest
version
is
not
on
Christ
il
because
I
have
an
issue
with
decimal
128
in
Abby's
on
crate,
but
I
can
compile
it
down
to
Azam
and
use
it
in
the
JavaScript
side
of
things.
So
there
is
the
rest
version
you
can
find
them
github,
but
the
bazan
version
of
the
JavaScript
version
you
can
npm
installed,
which
is
nice.
So
I'm
going
to
talk
about.
A
There
was
a
side
of
things,
but
before
I
do
that
the
entire
parser
just
takes
in
a
bunch
of
documents
and
outputs,
a
bunch
of
information
about
the
documents
you
have
in
a
particular
collection
in
MongoDB.
So
this
one
was
looking
at
some
of
the
bars
in
Berlin
and
then
it
compiled
all
that
information
together
and
that's
what
the
entire
barsa
does
just
kind
of
like
a
parser
but
on
documents
in
MongoDB.
A
So
you
got
things
that
count
of
how
many
fields
there
are
it
given
like
X
number
of
documents
and
you
can
get
like
the
different
field
types
all
together.
So
it
groups
everything
by
string
or
by
doubles
or
by
decimal
128,
and
things
like
that.
So
lots
of
aggregate
information
basically
and
what
happens
with
the
entire
kind
of
situation,
is
that
there's
a
bunch
of
moving
parts
and
I'm
just
gonna
talk
about
the
wasn't
part
but
I
think
it's
important
to
kind
of
know
how
the
whole
thing
works
together.
A
So
we
have
a
database
that
talks
to
that
little
sack,
which
is
a
collection
sample
that
samples
all
the
documents
coming
from
a
database,
and
then
it
passes
it
to
my
browser
or
my
electron.
App
in
this
case,
which
is
compass
and
compass,
does
the
talking
to
the
rasam
side
of
things
and
rasam
does
a
talking
to
rust,
and
that
goes
all
the
way
back
and
if
we
wanted
to
go
all
the
way
back.
But
today
is
kind
of
like
it
was
important
of
things.
So
I
wanted
to
make
sure
that
it
works
in
wasum.
A
But
how
does
it
work
in
wasum
and
how
to
get
the
warm
side
of
things
to
work
kind
of
at
a
rest
meet
up
but
kind
of
know
that
your
old
best
developers
in
you
can
figure
out
how
to
work
a
parson
rust
but
putting
it
down
to
vows
kind
of
gets
really
interesting
and
I.
Think
debugging
side
of
things
also
gets
really
interesting,
so
getting
it
to
compile
from
Rustom
is
actually
rather
easy.
You
just
install
a
zombie
engine
as
one
of
your
dependencies.
A
This
is
an
outdated
version,
there's
a
newer
version
out,
but
that
kind
of
does
all
the
compilation
for
you.
So
you
don't
have
to
do
a
lot
of
that.
What
it
does
is
it
generates
two
files.
One
is
a
JavaScript
file
that
points
out
to
all
the
Y's
M.
Things
comes
up
with
all
the
pointers
and
stuff
like
that,
and
then
you
can
use
that
JavaScript
in
your
JavaScript
application.
So
all
of
that
is
generated
for
you
and
what
you
do
is
you
annotate
a
bunch
of
your
coat?
A
So
this
is
one
of
the
points
of
my
API.
It's
just
a
schema,
parser
new
and
all
I
do
is
I
Mateos,
woz
and
bind
gen.
I
can
also
do
like
things
that
are
more
familiar
in
JavaScript
land,
which
is
give
it
a
javascript
name
and
make
it
a
constructor.
So
I
can
go
scheme
a
parser
new
new
schema
parser.
Things
like
that
and
I
can
also
give
like
names
that
are
more
familiar
in
JavaScript,
fried
JSON
with
J
capitalized,
since
we
don't
do
underscores
usually
in
JavaScript.
A
Coincidentally,
this
is
also
my
entire
packages
API,
and
what
the
package
does
is
that
it
is
meant
to
receive
a
bunch
of
documents
that
have
come
all
the
way
down
the
chain
from
the
MongoDB
driver,
and
it's
meant
to
return
all
that
information
together.
So
the
API
all
it
does.
Is
you
instantiate
it
with
new,
and
then
you
write
JSON
to
it
from
this
JavaScript
side
of
things
and
then,
when
you're
done
streaming
all
those
documents
you
just
go
into
JSON
and
then
puts
it
all
together
for
you
cool.
A
I
was
like
this
seems
really
easy.
The
docks
are
very
straightforward
and
so
I
wanted
to
build
up
this
project
and
see
how
it
goes
so
to
build.
You
just
do
cargo
build
and
you
target
to
was
him
32
to
make
sure
that
there's
no
errors
and
obviously
there
was
errors
and
they
come
from
very
unexpected
places.
So
one
of
these
was
the
fact
that
I
was
not
able
to
use
air
in
the
way
that
I
wanted
to
use
air
and
in
fact
all
of
that
came
from
this
module.
I
used
failure.
A
How
many
of
you
are
familiar
with
failure?
Cool
I
used
it
because
I
didn't
really
want
to
deal
with
all
the
different
arrow
types,
and
this
seemed
really
easy
for
me
and
I
still
use
it.
But
what
ended
up
happening
is
that
you
are
not
able
to
compile
this
down
to
a
zoom,
and
so
you
have
to
work.
Do
a
workaround
and
the
workaround
I
did.
Is
that
I
had
my
rust
API?
A
Do
the
rust,
API
things
and
I
rubbed
up
the
rust
API
into
a
wasn't
API,
so
I
still
had
the
rest
and
then
I
wanted
the
wasum
and
would
the
was
did
or
there
was
I'm
facing
API
or
the
JavaScript
facing
API
did?
Is
it
took
that
error
and
it
formatted
it
into
a
jlu?
And
so
I
was
just
matching
on
the
result
and
making
sure
there
is
no
error
and
then
just
put
it
outputted.
A
So
that's
like
one
of
the
the
two
ways
that
I've
handled
it
and
so
I
started
off
this
whole
project
with
just
kind
of
working
with
the
string
side
of
things,
and
it
worked
out
really
well
I,
think
and
up
until
a
certain
point,
where
I
realized
that
I
needed
to
be
dealing
with
more
data
types
than
just
a
string,
so
the
MongoDB
driver.
What
it
returns
to
us
is
a
bunch
of
different
types
like
doubles,
and
decimal.
128
and
I
would
be
losing
data
integrity
along
the
way
as
I
process.
A
This
data,
because
I
keep
serializing
and
deserializing,
and
it's
all
just
a
string.
So
it's
never
ever
a
decimal
128,
which
is
what
I
wanted
to
do.
And
what
happens
is
that
I
realized
that
the
no
driver
can
return
raw
beefs
on
data
and
no
driver?
Is
the
MongoDB
driver
that
I
use
in
my
electron
app
or
in
my
JavaScript
app,
and
so
what
I'd
have
to
do
is
then
work
with
that
raw
piece
on
data
and
then
kind
of
the
other
thing
I
realize.
A
Is
that
I'm
doing
a
lot
of
serializing
and
deserializing
under
the
hood,
not
necessarily
myself,
but
just
in
general?
There's
lots
of
things
happening,
and
so,
if
I
just
can
take
in
the
raw
Beeson
and
have
a
Rabi
Sun
up
until
the
very
end
until
ajith,
the
JavaScript
needs
to
parse.
The
JavaScript
object,
I
saved
myself,
a
lot
of
serializing
and
deserializing,
which
is
quite
nice,
so
I
have
this
Rabi
Sun,
which
essentially
turns
out
to
be
an
array
in
a
buffer
or
an
array
or
buffer
in
JavaScript.
A
But
what
that
transfers
in
rest
is
is
just
a
vector
which
is
really
nice
and
seems
like
a
straightforward
data
type.
But
what
I
just
told
you
earlier
is
that
you're
only
able
to
work
with
an
error
of
value
in
a
string.
So
how
do
we
make
the
two
of
those
work
with
Waze
and
bind
Jen
and
I
found
out
about
this?
Great
called
J
Isis
has
anybody
heard
of
it
before
yeah,
so
J
says?
Does
a
bunch
of
this
stuff
for
you,
so
I'm
able
to
actually
use
a
vector
and
along
amongst
other
things?
A
So
what
it
is
is
a
bunch
of
bindings,
Raghava
script,
api's
and
the
JavaScript
API
is
are
available.
Are
things
like
being
able
to
work
with
an
actual
object
being
able
to
work
with
a
function,
the
able
to
work
with
the?
U
n--
date
re,
which
is
frankly
exactly
what
I
need
it
in
that
particular
case,
because
a
un
Turay
you
and
eight
array
could
be
hacked
into
a
vector
pretty
easily.
A
So
how
that
ended
up
working
is
that
I,
instead
of
taking
a
string,
I
accepted
a
un8
array
and
I
did
some
magic
in
between
and
then
I
was
able
to
just
be
able
to
decode
a
document
based
on
that
particular
slice
that
I
have
taken.
The
magic
in
between
is
actually
kind
of
interesting,
and
this
is
exactly
what
you'd
have
to
be
doing.
A
But
what
it
resulted
in
is
a
much
faster
API,
but
also
in
an
API
that
allows
me
to
keep
all
the
data
integrity
intact,
which
is
good,
given
that
now
I
am
able
to
have
access
to
all
these
JavaScript
API
eyes.
I
can
also
now
work
with
better
errors.
So,
instead
of
having
like
a
string
to
fide
error,
that
I
ended
up
with
I
can
actually
use
a
properly
formatted
JavaScript
errors,
which
is
like,
for
example,
typer
or
eval
error.
Arranger,
and
things
like
that.
A
So
I
can
format
it
as
I
go
at
the
end
of
the
whole
API
being
worked
on,
but
they're
more
interesting
side
of
things
if
you
worked
was
but
with
wasn't
before,
is
being
able
to
debug
it
when
you
get
to
JavaScript
stuff,
and
so
guess
this
is
like
speaking
of
errors,
there's
a
bunch
of
different
things
that
will
come
through
as
you
as
you
develop.
Your
azzam
project
and
a
lot
of
them
is
just
runtime
exceptions
and
unexpected
errors,
and
so
a
runtime
error.
If
you
get
it
is
looking
like
this.
A
It's
if
I
just
log
it
out
in
JavaScript.
It
comes
up
as
an
unreachable,
runtime
error,
and
it
shows
you
kind
of
the
pointers
with
the
wasn't
functions
that
come
through
and
you
can
kind
of
go
through
various
things
that
come
through.
So
this
one
was
happening
in
my
API
called
write
raw
and
then
I
can
click
through
it
and
see
where
it
points
me
to.
A
But
it
kind
of
points
me
to
this
more
or
less
undo,
bugaboo
code,
and
so
it's
not
particularly
useful,
and
in
that
sense,
but
at
least
it
points
you
to
the
fact
that
it's
one
of
your
API
points
that
is
causing
this
particular
error.
Number
two
error
that
comes
through
is
the
one
you
would
as
an
exception.
You
would
throw
this
one's
a
little
bit
more
I,
guess
readable
in
the
sense
that
DD
you
do
have
a
wasn't
bind
and
throwing,
and
he
do
have
a
particular
method,
that's
getting
thrown.
A
So
in
this
particular
case
it
was
a
two
object
method
that
was
getting
thrown
and
it
would
come
from
something
like
this,
not
particular
type
error,
but
a
jss
error,
I
created
to
get
this
error
to
be
thrown,
and
then
you
can
also
click
through
a
little
bit.
So
some
of
the
stuff
is
not
very
readable,
so
I
should
click
on
the
particular
JavaScript
pointer
and
then,
if
I
go
to
the
wasum
unnamed
portion
of
things
I
get
to
this,
which
is
not
as
readable
as
that
JavaScript
error
you
get
through
and
to
object.
A
Is
that
particular
method?
That's
throwing
this
error,
so
this
is
what
an
exception
looks
like
there's,
also
errors
that
are
just
kind
of
difficult
to
get
through
and
I
like
to
call
them.
This
is
a
particular
one.
I've
been
getting
quite
often
for
very
different
things
that
has
caused
me
a
lot
of
headaches,
but
there's
a
few
things
that
I
figured
out
how
to
be
able
to
get
through
it.
So
what
this
reads
is
that
it's
an
uncaught
error
and
there's
your
cursive
use
of
an
object
detected
which
would
leave
to
unsay.
A
It
aligns
al
icing
in
rust,
and
so
when
I
first
got
this
I
wanted
to
get
through,
like
which
part
I
wasn't
buying
Jen
this
comes
through
or
which
part
of
my
code
it
comes
through.
So
the
first
thing
I
notice,
is
that
it's
coming
from
two
object,
which
is
one
of
my
API
methods
and
in
particular,
and
this
part
of
my
code,
which
is
the
JavaScript
compiled
of
wasn't,
bind
Jen
by
it.
Wasn't
mine
Jen,
so
that's
not
particularly
useful,
so
I
wanted
to
dig
into.
A
There
was
and
bind
Jen
side
of
things,
so
I
kind
of
went
in
and
just
googled,
this
exact
error
and
what
did
resulted
is
that
wasn't
binder
and
had
a
Bora
fail
somewhere
so
somewhere
in
my
code,
I
was
not
handling
boring
properly.
Perhaps
perhaps
I
wasn't
so.
This
bora
fail
comes
from
a
different
part
of
an
in
Poland.
This
is
a
lozen
ref
cell,
which
at
some
point
in
time,
I
figured
out
that
I
was
not
in
fact
using
I.
A
Don't
think
my
code
is
that
complicated
to
be
using
was
in
ref
sil,
and
so
what
I
realized
is
that
actually,
this
particular
time
and
there's
multiple
other
times
this
particular
one
was
coming
from
an
implemented
called
I
was
throwing
which
I
put
in
while
I
was
just
kind
of
hacking
on
a
thing
which
sucks
yeah.
So
this
was
an
implemented
call
that
was
stirring
the
whole
air.
A
So
it's
meant
to
analyze
the
whole
schema
and
output,
this
little
beautiful
graph
of
the
different
fuel
types,
but
instead
of
what
I
get
is
that
I
get
a
memory
access
out
of
bounds
from
wasum?
And
actually
this
particular
error
does
not
give
me
any
sort
of
wasum
things
to
debug.
It
just
gives
me
mostly
like
JavaScript
side
of
code
to
debug,
but.
A
Is
that
because
I'm
doing
a
for
Val,
what
I
should
be
using
is
better
names
first
of
all,
but
second
of
all,
I
should
actually
be
using
the
value
that
I
am
for
in
each
so
that
memory
out
of
bounds
came
from
a
few
instances
of
that
and
caused
a
little
bit
of
a
headache
and
a
little
bit
of
commenting
out
a
bunch
of
code
and
running
it
and
compiling
it
again.
So
I'm
gonna
compile
it
and
show
you
what
the
actual
code
looks
like.
A
A
The
way
I
wanted
it
to
be,
and
so
I
found
out
about
this
great
console
era,
panic
hook,
which
has
helped
out
quite
a
bit
and
what
it
does
is
it
gives
you
the
rest
suck
trace
when
you
do
end
up
panicking,
which
is
a
little
bit
more
helpful
at
some
point.
I
was
indexing
into
something
that
had
a
length
of
0,
and
this
in
fact,
can
be
covered
by
a
test
and
rust.
A
A
This
was
kind
of
like
a
side
project
that
I
did
for
logging,
which
pretty
prints
your
logs
for
you,
but
there
was
a
PR
to
make
it
also
work
in
azzam,
and
what
that
allowed
me
to
do
is
be
able
to
have
Russ
numbers
when
I'm
console.log,
so
I
can
kind
of
eliminate
the
eliminate
where
exactly
stuff
is
coming
from.
So
lots
of
rest
numbers
were
coming
through
and
I
was
able
to
kind
of
figure
out
which
parts
of
the
code
at
least
were
kind
of
passing
by
and
which
ones
are
not
we're.
A
So
in
this
case,
what
happened
was
that
one
of
my
dependencies,
which
was
Abby's
on
crate,
was
using
a
Lipsy
dependency
or
was
having
a
Lipsy
dependency
and
their
way
to
solve
that
is
watch
out
for
plates
that
have
Lipsy
and
work
out
for
a
workaround,
but
also
kind
of
have
two
builds
that
this
be
some
crate
ended
up
having
for
a
little
while
until
it
got
completely
eliminated.
So
you
can
have
two
different
targets
that
you're
building
for
one
is
132.
A
So
it's
kind
of
a
way
to
be
able
to
compile
down
still
without
having
to
use
it
and
kind
of
the
thing
here
is:
beware
of
anything
that
uses
anything
from
the
system,
because
that's
not
what
I'm
compatible,
including
Lipsy,
so
I
wanted
to
show
you
how
this
actually
worked
but
clearing
the
live
demos.
Don't
work
I,
specifically
fixed
my
code
to
have
an
error,
so
I
can
show
you
an
error,
and
now
it
doesn't
compile.
But
anyway,
I
hope
you
enjoyed
this
mess
of
a
wizened
cake
and
thanks
for
listening.
A
No
I
haven't
tried
that
the
way
I
wanted
to
do
it
was
to
have
both
waz
M
tests
and
Russ
tests
in
my
crate,
but
that
is
not
possible.
If
you
have
both
rust
and
wasum
compilation,
you
can
only
do
was
I,
don't
exactly
remember
what
it
is,
but
when
I
was
trying
to
run
it,
you
can
do
both
at
the
same
time,.
C
A
C
A
So
console
air
panic
hook
is
the
one
that
gives
you
a
little
bit
of
a
stack
trace
from
arrest,
but
not
necessarily
always
so.
With
the
index
out
of
bounds,
it
was
not
able
to
give
me
a
stack
trace,
but
sometimes
it'll
give
you
back
the
rest
error.
So
at
least
that
will
point
you
out
to
where
you
actually
have
to
go,
but
that's
only
for
panics.