►
Description
This video was recorded during the Rust KW Meetup in Kitchener-Waterloo, ON, Canada on Jun 19, 2018.
https://www.meetup.com/Rust-KW/events/251426929/
Three people performed short, 5-minute demos of their Rust projects.
Talks written and presented by:
- Tristan Hume (https://twitter.com/trishume)
- Agustin Chiappe Berrini (https://github.com/AgustinCB)
- Michael Hewson (https://twitter.com/mikeyhew)
Recording: Mark Sherry (https://twitter.com/alfedenzo)
A
Hi
so
I'm
Tristan,
Hume
I'm,
a
you
Waterloo
student
and
I
work
on
rust
in
my
spare
time
and
one
co-op
job.
That's
only
somewhat
related
to
us.
So
the
project
I'm
going
to
talk
about
is
sin
tact.
It's
a
syntax,
highlighting
library
for
rust,
and
it's
used
mostly.
It
was
mostly
intended
when
I
built
it,
for
there
were
various
text.
A
Editor
projects
cropping
up
written
in
rust
and
none
of
them
had
gotten
around
to
syntax,
highlighting
yet
so
I
was
thinking
like
instead
of
contributing
to
one
of
those,
then
I
can
just
write
a
syntax,
tiling
library
that
all
of
them
can
use.
Yes,.
B
A
If
you've
ever
heard
of
it,
it's
like
a
code
search
tool
online
and
they
do
all
their
highlighting
widths
intact,
and
it's
also
used
by
very
some
other,
like
small
projects,
some
static
site
engines
and
some
web
or
like
little
command-line
tools
for
printing
markdown
files
with
highlighted
code
blocks
or
printing
out
code
files
highlighted
for
you
yeah.
So
what
it
does
is
it's
a
replica
of
sublime
text,
syntax
highlighting
engine
and
sublime
text
open
sourced
all
there
grammars
and
a
lot
of
these
kind
of
style
files
are
also
available
open
source.
A
Okay,
never
mind
shortcuts,
not
gonna
happen,
but
basically
it
has.
These
all
parts
of
the
document
have
these
very
rich
kind
of
layered
representation
embedded
in
it.
So
this
will
say
like
it's
a
keyword,
that's
a
module,
related
keyword
in
JavaScript
and
then
it'll
also
have
a
stack
saying-
and
this
is
inside-
of
an
if
expression
inside
of
a
function
inside
of
a
javascript
file.
A
So
this
was
a
good
starting
point
and
one
of
the
reasons
I
wanted
to
reuse.
Sublimes
grammars,
is
that
the
sublime
grammar
files
are
these
JSON
grammar
json
files
that
are
fairly
easy
to
or
I
thought
at
the
time
fairly
easy
to
interpret
and
they
can
get
pretty
large.
So
this
javascript
grammar
is
1,500
lines
because
it
includes
all
sorts
of
fancy.
A
Acma
script,
six
features
and
things-
and
this
isn't
a
fairly
compact
representation
compared
to
some
other
ways
of
writing
grammars
and
it
uses
regular
expressions
and
sublimes
packages
has
30,000
lines
of
these
and
that's
just
the
ones
that
are
included
with
sublime
text.
Third
parties
have
written
all
sorts
of
other
grammars,
so
they're
probably
like.
A
If
you
want
to
cover
all
the
languages
that
people
reasonably
use,
you
probably
need
like
50
to
80
thousand
lines
of
grammar,
and
it
just
seemed
unreasonable
to
start
those
from
scratch
in
a
new
format,
even
if
the
new
format
would
have
been
faster
or
better
in
some
other
way,
and
also
there's
these
nice
highlighting
files
that
give
nice
themes.
These
are
just
XML
files
that
come
from
textmate
and
they
use
selectors
on
these
nice
expressions.
A
So
you
can
say,
like
I,
want
to
highlight
strings
and
symbols
which
are
a
ruby
thing
and
maybe
inherited
classes.
So
that's
nice
anyway.
It
can
also
be
used.
This
rich
representation
can
also
be
used
for
cool
things
like
reading
kind
of
semantic
information.
So
I
have
this
program
here,
I'm
going
to
need
to
do
command
+
on
my
terminal
to.
A
That
uses
syntax
to
count
lines
of
code,
it's
not
the
fastest
tool,
but
it
gives
you
a
bunch
of
things
that
you
couldn't
get
otherwise.
Without
this
fancy
representation
like
the
number
of
functions
and
the
lines
of
documentation,
comment
versus
normal
comment
and
things
like
that,
which
is
cool,
and
it
can
also
auto
detect
all
your
file
types
and
I
also
have
another
example,
which
is
I'm.
Gonna
need
to
make
this
terminal
bigger,
I.
A
Have
it
using
full
RGB
terminal
escape
code
supported
by
some
terminals
to
print
files
in
the
command
line?
So
this
is
a
file
highlighted
with
syntax,
and
one
of
the
great
features
of
sublime
is
highlighting
that
a
lot
of
highlighting
engines
don't
support,
is
nested
languages.
So
here
we
have
an
e
RB
file,
which
is
like
a
ruby
template
HTML
file.
A
So
it
can
highlight
all
I
think
it's
10,000
lines
of
jQuery
in
half
a
second
and
that's,
including
starting
up
and
loading
the
file
and
loading
all
the
grammars.
So
sublime.
Also
does
this
very
fast
in
fact
faster
than
us,
since
they
have
a
custom
reg
extension.
But
if
we
go
into
visual
studio
code.
A
And
there
so
we're
one
of
the
fastest
syntax
hiding
engines
and
that's
pretty
cool,
and
then
that's
I
think
all
I
have
to
show
yes,
so
that's
intact,
it's
a
syntax,
highlighting
library,
Oh
I
also
have
it
can
put
HTML
files
for
you,
so
this
is
jQuery
as
an
HTML
file
and
it
also
has
very
good
documentation.
All
the
methods
are
documented,
there's
examples
that
show
like
there's.
Also
this
easy
module.
I
made
it
so
that
the
API
is
very
powerful
for
like
text
editors
that
want
to
go
super
fast.
A
So
here's
the
example
of
Zhai,
it's
one
of
the
text,
editors
that
uses
rust
or
syntax.
It
also
uses
rust,
but
while
syntax
supports
these
fancy,
caching
workflows
where
you
can
like
cache,
parsing
States,
so
that
you
don't
have
to
reparse
everything
when
the
person
in
your
editor
makes
small
changes.
Those
api's
are
much
more
difficult
to
use
than
most
people
would
want
to
use.
A
C
I'm
working
in
a
library
called
McVean,
which
is
the
name
of
a
famous
photographer
that
basically
does
image
processing
on
pictures
of
people.
The
main
use
case
is
this
problem
that
I
was
trying
to
solve.
So
I
wanted
to
be
an
app
that
once
you
send
it
the
picture
of
a
soccer
player
in
the
field,
its
able
to
recognize
with
soccer
player.
It
is,
and
hopefully
send
some
statistics
all
these
in
the
context
of
the
current
World
Cup,
so
I
thought
well,
why
don't
I
do
it
in
rust?
C
C
C
The
features
that
it's
right
now
doing
is
basically
face
localization
and
cropping.
It's
using
a
couple
algorithm
that
are
implemented
in
open,
CV
I'm
working
in
the
in
doing
feature,
detection
right
now,
which
is
basically
recognizing
where
all
the
difference
parts
of
the
faces
are
located
in
the
picture,
and
after
that
the
next
step
will
be
face.
Front
elevation,
which
is
basically,
if
you
have
a
picture
of
someone
giving
you
the
I,
don't
know
how
to
say
it
in
English
the
profile.
C
Yes,
you
will
centralize
it,
so
you
see
it
as
if
they
were
in
front
of
you
lately
face
encoding,
which
is
basically
representing
a
face
as
an
array
of
vectors,
so
you
can
identify
it.
So
if
you
have
two
pictures
of
a
face,
you
represent
them
as
an
array
of
vectors,
and
you
are
able
to
calculate
the
different
the
distance
between
those
arrays
of
vectors
and
estimate
if
they
are
likely
from
the
same
person
or
not.
C
B
C
It
was
actually
kind
of
tricky
and
I
based
most
of
these
on
what
the
previous
project
doors
yeah,
so
that
project
CV
RS,
has
similar
problems
than
me.
There
are
some
tools
to
do
automatic,
banding,
Binion's
from
C
and
C++
libraries,
but
I
found
that
most
of
them
so
spelled
with
complex
libraries
like
the
Liebherr
or
open
CV
this
tool,
what
it
does
it's,
oh
I,
can
actually
show
you
now
here.
That
will
be
nice,
because
I
found
that
it's
a
very
nice
and
smart
way
to
do
it
and
it's
fairly
simple.
C
Yes,
so
if
you
see
there
is
here
a
folder
that
is
called
native
yes,
and
in
here
it
has
some
C
files
that
act
as
beaches
between
rust
and
the
celebrity,
and
it
uses
it
at
build
time.
It
compiles
these
files
and
eaten
licked
them
with
your
with
your
library
and
that
that
works
very,
very
well
needs
easier
than
trying
to
use
the
automatic
tools
that
just
fail
me
safely.
C
C
Good
a
good
way
to
solve
it
is
so
there
are
some
parameters
about
the
proportion
of
the
faces
that
you
want
to
to
to
identify
and
adjust
in
that
parameter.
You
can
make
sure
that
you
don't
get
faces
that
more
than
one
face
in
the
in
the
picture
that
have
hugely
different
proportions,
which
is
what
usually
happens
with
the
face.
They
have
different
proportions.
C
B
C
D
D
You
can
have
methods
right
and
there's
four
kinds
of
methods
you
can
have
there's
ones
that
takes
off
by
value
or
self
by
reference
by
reference
or
by
box.
You
might
not
have
seen
this
one
before
and
that's
it
so
I
guess.
The
easy
question
is:
why
is
it?
Why
is
box
so
special?
And
that's
because
it's
special
is
everyone
following
me:
okay
see
one
sec
so
in
the
future
that
I
added
was
arbitrary,
soft
types
or
custom
method
receivers.
So
basically
anything
can
be
a
method.
Receiver.
D
D
D
So
if
you
want
to
make
something
that
you
can
use
as
a
self
type
like
as
the
receiver
for
a
method
call,
it
has
to,
it
just
has
to
implement
the
ref,
and
so
here's
this
truck.
It's
just
it's
just
a
reference,
but
it's
my
ref
instead
and
here's
a
method
for
the
fool
type
that
takes
my
graph
is
the
self
argument
and.
D
It
works
yeah,
so
this
also
works
for
traits
for
was
a
struct,
but
if
you
had
a
trait
and
you
can
have
methods
that
take
like
RC
or
whatever
custom
method,
receiver
type,
except
that
it's
not
object
safe
yet
so
like
stuff
like
RC,
should
be
objects.
If
you
should
be
able
to
have
a
trait
object,
that
with
a
method
that
takes
an
RC
of
the
trait
object,
but
it
doesn't
work
yet.
So
that's
the
next
thing:
I
want
to
implement
and
yeah.
So
demo
Oh
questions.
D
A
D
Anyone
else
mark
nope,
like
probably
around
the
same
time
that
pin
and
a
single
waiter
is
stabilized,
but
who
knows
maybe
like
a
year
or
two
years,
it
needs
some
work.
I
think
it's
some
like
edge
cases
that
aren't
they're
not
like
soundness
holes,
but
just
stuff
that
doesn't
work.
That
should
work
that
probably
needs
to
be
cleaned
up.
Yeah.