►
From YouTube: RustFest Paris 2018 - Yew a Rust+WebAssembly framework for client-side web apps by Denis Kolodin
Description
Here is Denis Kolodin for you Talk
about his framework called 'yew'
His daily work fits
to a fury of bits
and a Rust blockchain speed-trading crew
This is a talk about the architecture of yew — a Rust framework for frontend development, inspired by Elm and ReactJS and designed for creating single-page webapps with Rust. You will get to know how it was created: wasm compilation issues, JSX-like templates created with a pure Rust macro, how lifetime rules helps to avoid copying of the model, and how to create a framework without a garbage collector to compete in the JavaScript world.
(Limerick by @llogiq)
https://paris.rustfest.eu/sessions/yew-the-rust-webassembly-web-app-framework
A
B
At
first
I
have
I
also
you
what
is
you
will
have
an
introduction
about
it
and
after
that,
I
show
you
how
to
create
a
minimal
application
using
this
framework,
what
we
will
talk
about
what
you
should
know
to
use
this
framework
effectively
and
in
the
last
topic,
I
will
explain
and
show
you
how
I
created
the
framework
from
the
first
steps
and
to
the
final
state
which
you
can
see
on
the
github,
a
ok.
Let's
start
with
introduction
of
you
and
a
minimal
application.
B
You
is
a
ready
to
use
web
assembly
framework
I
created
a
half
year
ago,
I
released
it
16
December
of
last
year,
and
it
was
exactly
four
days
up
from
my
birthday,
as
a
community
community
gave
a
great
present
great
gift.
For
me,
the
project
called
I
collected
four
thousand
stars
for
today,
it's
open
source
and
it
released
under
two
licenses
which
popular
in
rust,
community,
MIT
for
commercial
proposes
and
apache
license
for
GPL
compatible
projects.
B
B
Ok,
let's
start
with
minimal
application
at
first,
you
should
create
a
simple
struck:
I
call
it
mobile
with
one
field,
I
called
value
and
to
turn
it
into
a
user
interface
component.
You
should
implement
a
component
trade
where
this
trade
could
create
instances
of
this
of
the
component,
and
that's
why
it
has
to
contain
create
method
which
returns
a
new
campaign
instance.
B
B
B
You
can
also
see
the
click
handlers
in
the
buttons
and
they
send
messages
into
update
function
back
when
you
click
on
this
button.
In
the
browser
to
stop
start,
this
application,
you
have
to
add
main
function,
and
you
should
just
initialize
this
framework.
I
create
a
context.
I
created
empty
context
here
and
use
unit
type,
but
you
could
create
more
complex
contexts
if
you
need
more
services.
B
I
also
created
application
instance
here
and
mount
it
into
to
the
real
Dom
element.
I
used
body
tag,
but
you
could
mount
the
application
to
any
element
of
the
Dom
tree
and
stop
the
loop
before
I
show
you
the
result.
How
it
looks
have
looks
like
let's
see
how
to
build
this
application
to
build
this
code,
you
you
need
a
special
cantillation
and
tag
it
and
you
could
install
install
it
with
rust,
app
to
add
web
assembly
unknown.
Take
it.
B
You
also
may
need
in
scripting
target,
and
it
might
come
in
handy
and
I
will
describe
why
it's
why
you
may
need
M
script.
A
little
later,
I
also
recommend
you
to
install
carga
web
tool.
It
help
you
to
watch,
build
and
run
your
code,
create
a
binary
grade
and
food
code.
I
showed
you
in
to
enter
source
folder
of
your
project
and
run
it
with
cargo
web
to
set
necessary
target.
B
B
B
B
B
Even
could
put
confidence
in
director
into
templates.
This
feature
uses
Road
types
without
any
wrappers.
You
could
use
I
put
counter
into
the
template,
like
you
can
do
in.
If
you
familiar
with
rag,
jazz
and
jazz
vi,
template
language
and
company
could
contain
properties.
Properties
is
a
simple
struct
use.
Pure
rust
types
inside
templates
said
types
you
need,
and
you
could
use
these
types
in
the
template
and
also
you
have
to
implement
default
trade
because
all
properties,
optional.
B
B
There
are
five
types
of
no
nodes
which
you
can
use,
first,
is
virtual
company
and
which
holds
a
component
struct
inside
virtual
list,
which
has
a
list
of
other
nodes,
and
it
will
put
it
as
a
fragment
into
the
Dom
tree
virtual
Tech,
which
produces
a
real
Dom
element
and
virtual
text,
which
produces
a
real
text
node
and
the
last
type
of
node
is
a
virtual
reference
which
keeps
a
reference
to
an
existing
element.
The
last
is
useful
for
embedding
JavaScript
components
into
a
visual
tree.
B
B
B
B
Html
macro
was
another
challenge.
I
tried
to
purse
at
first
I
tried
to
purse
whole
tag
cursory,
but
it
exceeded
recursion
limits
of
the
compiler
to
fast.
Actually,
it
doesn't
work.
This
probably
doesn't
work
and
I
replaced
it
with
separate
rules
for
opening
tag
and
for
closing
text
and,
as
add
some
special
rules
for
passing
attributes.
B
B
You
you
don't
have
threads,
but
you
could
use
web
workers
API
I,
but
I
can't
ambit
and
use
grades
like
Diane
programming
language,
because
it's
extensible
excessively
uses
threads
and
I
can't
compile
it
into
web
assembly
it.
It
won't
work
in
the
browser,
but
maybe
in
another
web
assembly
environment,
but
not
in
the
browsers
there
are.
There
is
no
system
API,
it's
not
available,
but
you
could
emulate
some
with
inscription.
If
you
compile
your
application
with
inscription-
and
some
crates
will
work
of
that,
but
it
takes
some
overhead
for
him.
Scoob.
B
B
B
I
will
do
it
in
the
future
and
I
believe
it
could
hit
JavaScript
in
in
many
cases,
because
web
rust
and
webassembly
don't
use
garbage,
collector
and
other
overheads
and
I
believe
it.
It
will
work
fast,
but
I
haven't
been
Mitch
McConnell
now
and
I
can't
answer
the
question:
how
fast
is
it
I
want
to
involve
more
contributors
to
the
project,
search
external
contributors
already
sent
their
pull
requests
and
I've
noticed
them.
B
B
B
B
C
B
B
When
I
have
some
issues
with
ell
programming
language
and
after
that,
when
I
created
the
framework
which
works
similar
like
L
I
found
that
I
could
replace
templates,
which
looks
like
which,
which
could
work
like
rect,
rect,
Jess
template
languages,
but
a
language
but
in
question
with
resurrect
it's
not
because
you
framework
has
own
direction
of
improve,
improving
and,
for
example,
now
I'm
considering
to
use
actors
which
I
I,
don't
I
haven't
seen
another
frameworks.
I
I
want
to
try
to
use
actors
to.
B
E
Thank
you,
I
wanted
to
ask
you:
do
you
have
any
advice
for
like
selling
moving
to
a
framework
like
this
from
traditional
JavaScript
frameworks,
for
maybe
bosses
who
have
no
idea
what
you're
talking
about.
F
I
hope
it
will
be
short,
so
the
main
point
is:
have
you
tried
to
make
the
backhand
swappable
in
the
sense
now
it
is
a
framework
that
manipulates
HTML.
It
could
manipulate
any
kind
of
tree
like
do
3d,
rendering
or
a
scene
graph
or
a
set
of
web
sockets
or
whatever
have
you
have
you
taught
the
backend
as
a
swappable
thing.