►
From YouTube: Rust and Tell April 2019: Lin Clark - WASI
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
B
B
So
basically,
what
we're
doing
is
creating
a
standard
way
to
run
web
assembly
outside
of
the
browser-
and
you
might
not
have
heard
this
before,
because
we've
just
announced
it
last
month.
So
I'll
explain
at
a
high
level
the
why
the
what
and
the
who
and
then
we
can
start
diving
into
some
of
the
actual
details
of
this
is
the
no-face
so
first
off,
why?
Why
would
you
want
to
run
web
assembly
outside
its
browser?
And
you.
B
Funny
the
first
time
I
gave
this
talk
was
the
day
after
we
made
the
announcement.
So
I
was
drafting
the
talk
right
after
I
sent
out
the
tweet
for
the
announcement.
It
was
at
exactly
this
point
in
my
draft
when
this
tweet
came
in
from
the
co-founder
of
docker,
so
he
says
if
wasman
wise,
they
existed
in
2008,
we
wouldn't
have
needed
to
create
docker.
That's
how
important
it
is
web
assembly
on
the
server
is
the
future
of
computing
and
I
want.
B
Use
case
we're
running
web
assembly
outside
of
the
browser
could
be
helpful.
It
can
be
helpful
for
things
like
node
for
other
kinds
of
service
applications
for
the
blockchain,
for
things
like
portable
CLI
tools,
the
Internet
of
Things
and
more
than
that
and
I've
talked
about
these
use
cases
before
in
a
post,
an
article
app
that
I
co-authored
with
Jill
shine
right
and
Luc
Wagner
about
the
post,
MVP
feature
of
pop
assembly.
So
I'm
not
gonna,
go
it's
too
much
detail.
B
If
you
want
to
learn
more
about
the
different
use
cases,
you
can
check
out
that
article,
but
I
do
want
to
talk
about
some
of
the
reasons.
The
common
reasons
between
all
these
use
cases
why
webassembly
makes
sense
so
first
off
web
assemblies
fast,
it
gives
you
the
ability
to
run
code
at
near
native
speeds,
and
it's
not
just
that
the
code
runs
fast.
B
It
can
also
give
you
fast
startup
times
and
VMs
that
are
built
for
website
leaking
actually
start
up
more
quickly
than
VMS
are
built
for
things
like
javascript.
So,
for
example,
fastly
is
using
web
assembly
to
handle
requests
for
their
server
list
platform,
and
they
do
this
by
spinning
up
a
new
virtual
machine
instance
on
every
single
request,
and
they
can
only
do
this
because
they
can
instantiate
the
web
symbol,
a
module
in
under
50
microseconds.
B
B
The
same
web
assembly
file
can
be
run
in
a
bunch
of
different
runtimes
across
different
kinds
of
machines
using
different
kinds
of
operating
systems,
and
this
means
that
you
don't
have
to
do
things
like
compiling
your
module,
specifically
for
every
device
you're
targeting
and
web
somebody's,
also
scalable.
It
takes
a
lot
less
memory
to
run
a
web
assembly
VM
that
does
a
JavaScript
beyond
so
I
mentioned
fasting
for
their.
B
Only
requires
a
few
kilobytes
of
memory
overhead
compared
to
tens
of
megabytes
with
v8,
so
this
means
that
they
can
fit
tens
of
thousands
of
simultaneously
running
programs
in
the
same
process
as
opposed
to.
If
you
are
using
gate,
you
could
only
do
hundreds.
So
that's
why
you
would
want
to
run
web
assembly
outside
of
the
browser.
Now,
let's
look
at
the
what
the
what
of
Razzie,
what
it
actually
is
when
I
was
introducing
web
assembly
I
talked
about
how
is
an
assembly
language
for
conception,
a
conceptual
machine
not
for
an
actual
physical
machine.
B
This
is
why
I
can
run
across
a
bunch
of
different
machine
architectures,
it's
very
close
to
the
assembly
language
that
most
machines
use,
so
the
runtime
only
needs
to
make
a
small
jump
from
the
web
assembly
to
the
assembly
language
for
the
machine
that
that
front
times
running
on.
So
it
goes
from
this
assembly
for
the
conceptual
machine
to
the
assembly
for
the
actual
machine.
B
Just
as
web
assembly
is
an
assembly
language
for
a
conceptual
machine.
Webassembly
needs
a
system
interface
for
conceptual
operating
system,
not
for
any
single
operating
system.
This
way
it
can
be
run
across
a
whole
bunch
of
different
operating
systems,
and
this
is
what
huazi
is
the
system
interface
for
the
web
assembly
platform.
B
B
If
you
have
you
know
deep
understanding
of
operating
systems-
and
you
know
have
some
ideas
about
how
this
standard
could
work,
you
can
join
the
CG
and
work
on
the
standardization
or
you
can
start
contributing
to
one
of
the
implementations,
such
as
madam
time,
which
is
the
webassembly
runtime
that
we're
working
on
it
was
elect,
or
if
you
have
an
existing
project
that
you
know
might
be
able
to
use
Y
Z.
You
can
feel
free
to
get
in
touch
with
us
and
we
would
be
happy
to
talk
more
about
it.
B
For
example,
we've
been
talking
with
the
node
folks
about
how
they
could
possibly
use
Y
Z
so
that
you
could
have
native
no
modules
modules
that
are
written
in
C
and
which,
typically
in
node,
have
to
be
compiled.
You
know
either
delivered
as
a
binary
or
compiled
on
the
device.
We
could
do
that
with
Wasley
instead,
so
that
those
modules
would
be
portable
in
the
same
way
the
JavaScript
modules
and
noter
portable.
B
So
now
is
all
of
that
covered.
Let's
talk
about
huazi
in
more
detail,
so
a
lot
of
people
talked
about
languages
like
C,
giving
you
direct
access
to
system
resources,
but
that's
not
quite
true.
These
languages
don't
have
direct
access
to
things.
They
can't
do
things
like
open
or
create
files
on
most
systems
directly.
Why
not?
Because
these
system
resources
such
as
files,
memory,
network
connections,
they're
too
important
to
the
stability
and
security
of
your
computer?
B
If
one
program
unintentionally
messes
with
the
resources
of
another,
then
it
could
crash
the
program
even
worse,
of
a
program
or
user
intentional
messes
with
the
resources
of
another.
It
could
leak
sensitive
data,
so
we
need
a
way
to
control
which
programs
and
users
can
access
which
resources
people
figure
this
out
pretty
early
on
and
came
up
with
a
way
to
provide
this
kind
of
control,
which
is
protection,
rain
security.
B
B
It
asks
using
a
system
call,
so
this
gets
the
kernel
a
chance
to
figure
out
which
user
is
asking
and
then
I
can
see
if
that
user
has
access
to
the
file
before
it
does
the
operation
before
it
opens
it
or
changes
it
on
most
devices.
This
is
the
only
way
that
your
code
can
access
the
system's
resources
through
system
calls,
and
the
operating
system
is
what
makes
these
system
calls
available,
but
a
feature
operating
system
has
its
own
system
calls.
Wouldn't
you
need
a
different
version
of
your
code
for
every
single
operating
system?
B
Most
languages
provide
a
standard
library,
so,
while
coding
the
programmer
doesn't
need
to
know
which
system
they'll
be
targeting
in
the
end,
they
just
use
that
interface
and
then,
when
compiling
the
toolchain
picks
out,
which
implementation
of
that
interface
to
use
based
on
whichever
system
you're
targeting.
So
this
implementation
uses
functions
from
the
operating
systems
API.
B
B
This
is
a
problem
for
webassembly,
though
with
webassembly,
you
don't
know
what
kind
of
operating
system
you're
going
to
be
targeting
even
when
you're
compiling,
so
you
can't
use
any
single
operating
systems.
Interface
inside
the
web
assembly,
implementation
of
the
standard
library
I've
talked
before
about
how
web
assembly
is
an
assembly
language
for
the
compiler
machine.
You
know
I
talked
about
that
in
my
intro,
not
for
the
real
machine
and
in
the
same
way
we
need
this
conceptual
system
interface
for
the
conceptual
operating
system,
not
a
real
operating
system,
but
they're
already
runtimes.
B
That
can
run
web
assembly
outside
of
the
browser
even
without
having
that
interface
in
place.
So
how
are
they
doing
it?
Let's
take
a
look,
so
the
first
tool
for
producing
web
assembly
was
unscripted.
It
Emil
emulates
a
particular
operating
system,
sister
interface
POSIX
on
the
web,
and
so
that
means
that
the
programmer
can
use
functions
from
the
C
standard
library
Lipsy.
B
To
do
this
and
script
and
redo
this
own
implementation
of
Lipsy
and
this
implementation
was
split
into
particle,
was
compiled
into
the
web
assembly
module
and
the
other
part
was
implemented
in
J's
blue
code.
That
would
interact
with
the
system.
You
know
that
jazz
blue
code
would
call
into
the
browser,
and
that
would
then
talk
to
the
operating
system
and
most
of
the
early
web
assembly
code
was
compiled
using
Emscripten.
So
when
people
started
wanting
to
run
web
simply
code
outside
of
the
browser,
they
started
by
making
the
sub
script
and
compiled
code.
B
So
that
meant
that
these
runtimes
need
to
create
their
own
implementations
for
all
of
these
functions
that
were
in
the
J's
glue
code,
and
this
is
where
the
problem
comes.
In
the
interface
provided
by
the
J's
glue
code
wasn't
designed
to
be
a
standard
or
even
to
be
a
public
interface
at
all,
because
that
wasn't
the
problem
that
was
trying
to
solve
so,
for
example,
for
a
function
that
be
called
something
like
read
in
an
API
that
was
designed
to
be
a
public
API.
B
The
jeaious
glue
code
instead
uses
underscore
system
three,
the
first
parameter,
which
is
an
integer
which
is
always
the
same
number
as
what's
in
the
name.
So
three
in
this
case
and
the
second
parameter
VAR
args,
is
the
arguments
use,
and
you
know
you
can
tell
from
the
name
there's
a
variable
number
of
them,
but
what
assembly
doesn't
provide
a
way
to
pass
in
a
variable
number
of
arguments
to
a
function?
So
instead
the
arguments
are
passed
in
via
linear
memory
by
others.
B
Basically,
now
this
isn't
typesafe
and
it's
also
slower
than
it
would
be
if
you
could
pass
these
in
using
registers-
and
that
was
fine
for
in
scripting.
That
was
running
in
the
browser.
But
now
runtimes
are
treating
this
as
a
de-facto
standard
and
they're
implementing
their
own
versions
of
this
J's
code.
So
they're
emulating
an
internal
detail
of
an
emulation
layer
of
classics.
This
means
that
they're
really
implementing
choices
like
the
passing
in
arguments
as
heap
values
that
made
sense
based
on
the
descriptives
constraints,
even
though
those
constraints
don't
apply
in
their
environments.
B
If
we're
going
to
build
a
web
assembly
ecosystem
that
lasts
for
decades,
we
need
solid
foundations.
So
this
means
that
our
de
facto
standard
can't
be
an
emulation
of
an
emulation,
but
what
principles
should
we
apply?
There
are
two
important
principles
that
are
baked
into
web
assembly,
Portability
and
security.
B
B
Posix
provides
source
code
portability.
You
can
compile
the
same
source
code
with
different
versions
of
Lipsy
to
target
different
machines,
but
what
assembly
needs
to
go
one
step
beyond
this?
We
need
to
be
able
to
compile
once
and
run
across
a
whole
bunch
of
different
machines,
so
we
need
portable
binaries.
B
Now,
let's
look
at
security
when
a
line
of
code
asks
the
operating
system,
do
some
input
or
output,
the
operating
system
needs
to
determine
if
it's
safe
to
do
what
the
code
is
asking
to
do
now.
Operating
systems
typically
handle
this
with
access
control,
that's
based
on
ownership
and
groups.
So,
for
example,
the
program
might
ask
the
OS
to
open
a
file
and
a
user
has
access
to
a
certain
set
of
files
when
the
user
starts
the
program.
The
program
is
running
on
behalf
of
that
user.
B
So
that
means
that
if
the
user
has
access
to
the
file
either
because
they
are
the
owner
or
because
they're
a
group
that
has
access
to
it,
then
the
program
has
that
same
access
to
that
protects
users
from
each
other,
and
that
made
a
lot
of
sense
when
the
early
operating
systems
were
developed,
because
citizens
were
usually
multi-user
and
administrators
controlled.
What
software
was
installed,
so
the
biggest
threat
that
you
had
as
a
user
was
that
other
users
were
going
to
take
a
peek,
your
files,
but
that's
change.
Now.
B
You
know
often
happen
with
an
open
source
that
maintainer
might
have
your
interests,
your
best
interest
at
heart,
or
they
may
be
one
of
the
bad
guys
and
if
they
have
access
to
do
anything
on
your
system,
for
example,
open
any
of
your
files
and
send
them
over
network,
then
your
code
that
code
can
do
a
lot
of
damage.
So
this
is
why
using
third-party
libraries
that
can
talk
directly
to
the
distress
wipe
assemblies
way
of
doing
security
is
different
web
assemblies
sandboxed.
B
So
it
doesn't
just
let
the
program
act
on
behalf
of
the
user,
calling
any
system
call
with
users
full
permissions,
but
just
having
this
macca,
not
mechanism
for
sandbox
in
doesn't
make
a
system
secure
in
and
of
itself.
The
host
could
still
put
all
of
the
capabilities
into
the
sandbox,
in
which
case
we're
no
better
off
than
we
were
before,
but
at
least
it
gives
hosts
the
option
of
creating
a
more
secure
system.
B
B
This
proposal
is
to
create
a
modular
set
of
standard
library,
a
standard
interfaces
and
starting
with
standardizing
the
most
fundamental
module
which
is
widely
core.
So
what
will
be
in
wasseypur?
Well,
YC
core
will
contain
the
basics
that
all
programs
need.
It
will
cover
much
of
the
same
ground
as
POSIX,
including
things
such
as
files,
network
connections,
clocks
and
random
numbers,
and
we'll
take
a
very
similar
approach
to
POSIX
for
many
of
these
things.
B
So,
for
example,
we
use
a
POSIX
s
file,
oriented
approach
where
you
have
system
calls,
such
as
open
flows,
read
and
write,
and
everything
else
basically
provides
augmentations
on
top
of
that.
But
huazi
core
won't
cover
everything
that
POSIX
does
so,
for
example,
the
process
concept
doesn't
map
clearly
on
to
web
assembly.
B
Beyond
that,
it
doesn't
make
sense
to
say
that
every
webassembly
engine
needs
to
support
process
operations
like
fork,
but
we
do
want
to
make
it
possible
to
standardize
fork.
So
this
is
where
this
modular
approach
comes.
In
this
way
we
can
get
good
standardization
coverage,
while
still
allowing
niche
platforms
to
use
only
the
parts
of
huazi
that
makes
sense
for
them.
B
So
how
will
this
be
used?
Well,
languages
like
rust
will
use
y'see
cords
in
their
standard
libraries.
So,
for
example,
rusts
open
is
implemented
by
calling
what
has
a
path
open
when
it's
compiled
to
web
assembly
for
CM
C++,
we've
created
a
y'see
sis
route
that
implements
Lipsy
in
terms
of
Y
Z
core
functions,
and
we
expect
compilers
like
playing
to
be
ready
to
interface
with
the
Y
Z
API
and
complete
tool
chains
like
rusty
and
in
scripted
to
use
Y
Z
as
part
of
their
system,
implementations
and,
in
fact,
rust
already
does
have
support.
B
B
The
runtime
that
is
running
the
code
passes
the
Y
Z
core
functions
in
as
imports.
This
gives
us
portability
because
each
host
can
have
their
own
implementation
of
YC
core.
That
is
especially
written
for
their
platform,
so
from
web
assembly
runtimes
like
our
awesome
time
and
fastly
loose
it
to
note
or
even
the
browser.
B
It
also
gives
us
an
boxing
because
the
host
can
choose
which
quasi
core
functions
pass
in
so
which
system
calls
to
allow
on
the
program
by
program
basis.
So
this
preserves
the
security
that
I
was
talking
about
the
floor,
but
YC
also
gives
us
a
way
to
extend
the
security
even
further.
It
brings
in
more
concepts
from
capabilities
based
security.
B
Traditionally,
if
code
needs
to
open
a
file,
it
calls
open
with
a
string
which
is
the
path
name
of
that
file,
and
then
the
OS
does
a
check
to
see
if
the
code
has
permission
based
on
the
user
who
started
the
program
with
y'see.
If
you're
calling
a
function
that
needs
to
access
a
file,
you
have
to
pass
a
file
descriptor
which
has
permissions
attached
to
it.
This
could
be
for
the
file
itself
or
it
could
be
for
a
directory
that
contains
the
file.
B
This
way,
you
can't
have
code
that
randomly
asks
to
open,
ett
password.
Instead,
the
code
can
only
operate
on
the
directories
that
are
passed
into
it,
so
this
makes
it
possible
to
safely
give
sandbox
code
more
access
to
the
different
system
calls
because
the
capabilities
of
these
system
calls
can
be
limited,
and
this
happens
on
the
module
by
module
basis.
B
B
One
case
where
it
won't
just
work
is
if
that
code
uses
open.
If
the
code
use
is
open
and
migrating
to
the
open,
a
style
is
too
much
upfront
investment,
whereas
he
can
provide
an
incremental
solution.
So,
with
a
library
called
lip
read
open,
you
can
create
a
list
of
file
paths
that
the
application
legitimately
means
access
to,
and
then
you
can
use
open,
but
just
with
those
paths.
B
So
what's
next
well,
we
think
wasseypur
is
a
good
start.
It
preserves
web
assemblies,
Portability
and
security,
providing
us
all
nation
for
an
ecosystem,
but
there's
still
questions
that
we'll
need
to
address
after
huazi,
Corps
or
Wildlife,
the
core
is
being
standardized
and
those
questions
include
asynchronous
IO
file
watching
file,
locking
and
others.
B
So
I
want
to
thank
my
collaborators
on
developing
this
talk:
Dan,
Goleman,
who's,
the
lead
developer
on
huasi
and
our
webassembly
runtime
Bassem
time
til
tonight,
right,
who
is
the
manager
of
our
developer
technologies,
team,
focusing
on
rust
and
web
sembly,
and
also
dance
manager
and
luke
Wagner
who's?
One
of
web
assemblies
creators
and
a
driving
force
in
all
things
violently.
So
thank
you
to
all
of
them
and
thank
you
all
for
listening.
D
B
A
B
A
B
A
Processes
where-
and
you
could
continue
use
cases
here-
this
would
make
sense,
certainly
wouldn't
make
sense
for
all
abundance.
But
if
you
want
to
have
something,
that's
we
need
that
we
bare
metal,
and
you
could
imagine
that
essentially
doing
away
with
the
operating
system
and
implementing
the
resistors
calls
directly.
C
B
C
B
C
B
One
of
the
nice
things
about
it
is
that
it's
not
actually
being
not
the
runtimes
needs
to
support
it.
Only
runtime
step
one
two.
It
basically
allows
you
to
put
the
hosts
garbage
collector
in
to
integrate,
rather
with
the
host
garbage
collection.
If
you
have
a
webassembly
runtime
that
doesn't
integrate
with
JavaScript
or
another
language
is
language
that
has
a
garbage
collector,
you
don't
need
to
implement
it
and
there's
no
performance
penalty
at
all
for
it.
B
A
Is
so
they're
they're
cleaning,
no
beginnings,
she's
lying,
but
one
thing
is
very
clear:
just
having
multi
sweating
exposed
at
all
Sherman
we
than
being
able
to
spawn
additional
threats.
That
would
probably
be
a
capability
in
itself
that
you
would
have
to
explicitly
request
and
then
doing
things
like
pinning
went
to
specific
course
would
almost
certainly
be
this
would
capability,
because
it
allows
you
to
to.