►
From YouTube: Node.js N-API Team meeting - April 1 2019
Description
B
C
B
A
A
Next
up
people
haven't
a
chance
to
read
that
as
probably
to
go
through
and
and
then
maybe
we
can
spent
the
schedule
some
time
to
discuss
it.
But
it
sounds
like
so
we're
you
know
it.
It
may
be
like
even
the
JSON
parsing
stuff
like,
even
if
we
were
to
say,
let's
pull
more
stuff
in
it's,
not
clear
that
everything
would
still
go
in.
So
it's
I.
A
D
A
A
A
A
C
B
D
A
A
C
E
A
C
A
B
C
I
I
started
looking
at
that
I
think
I
think
what
what
kevin
has
is
good,
but
I
I'm,
trying
to
figure
out
what
like,
where
his
branch
is,
that
III,
just
I
just
did
a
diff
between
between
his
branch
and
and
master
and
I'm.
Just
looking
through
the
through
the
sort
of
changes
that
he's
making
and
yeah
it's
it's
pretty
good
III.
C
One
thing
that
I,
don't
quite
understand
is
why
why
I
think
both
both
him
and
Roman
have
why
they're
templating
so
much
because
like
they
they
have,
they
are
trying
to
cover
the
use
case
where,
where
things
are
no
and
and
you
know
each
one
of
those
combinations
of
this
is
now
that
is
not
now
that
is
now.
This
is
not
now
requires
a
an
override
like
a
different
new
method,
with
a
different
signature
and.
A
C
Templating
those
things
but
since
since
the
since
the
class
itself
is
also
templated
I,
don't
quite
understand
why
they
need
to
template
those,
because
if
they,
if
they
mention
any
of
the
type
names
listed
in
the
template
and
that
will
be
templated
implicitly
so
they
do
have,
they
do
have
default
types
or
for
the
for
for
the
template
parameters
of
null
pointer.
And
so
maybe
that's
that's
forcing
them.
But
III
have
to
look
in
more
detail.
But.
C
It's
it's
pretty
good,
like
there's,
you
know,
there's
no
easy
way
to
do
thread
safe
function.
So
so
what
we
have
is
pretty
good
I
just
have
to
I
just
have
to
go
through
it
and
and
have
a
look
and,
and
most
importantly,
I'd
like
to
get
a
feel
for
what
it
will
be.
Like
writing
code
with
with
this
right.
A
C
Place
you
know
so
that,
because
I'd
like
to
avoid
having
people
explicitly
template
their
stuff,
you
know
so
so
you
know
I'd
like
to
be
able
to
come
up
with
an
interface
that
they
can
just
use
and
and
the
datatypes
just
automatically
work,
because
the
template
thing
infers
them
properly
that
that's
probably,
that
would
probably
be
ideal.
So.
C
Just
use
them,
but
yeah
I'd
like
to
I'd
like
to
basically
write
some
code
using
this
API
and
some
so
I
grabbed
I
grabbed
the
code
for
from
Kevin
because
he
seems
to
have
built
upon
what
Roman
dev
has.
So
that's
why
I
grabbed
from
him
and
yeah
I
just
write
I,
don't
know
something
with
the
thread-safe
function
and
we'll
go
from
there.
I
look
at
the
test
too.
I
haven't
really
had
a
chance
to
see
how
the
how
the
seat
at
translates
into
into
C++,
okay,.
A
C
A
C
A
C
A
A
A
A
B
E
A
A
B
A
C
A
Iii
investigated
that
before
I
went
away
and
yeah
I
think
I
confirmed
that
there's
something
going
on
there,
but
I
couldn't
quite
didn't,
didn't
get
far
enough
to
see
where
it
is.
Although
it
kind
of
seemed
to
me
that
it
might
be
in
some
of
the
underlying
stuff,
as
opposed
to
the
N
API
implementation,
but
yeah.
C
C
C
A
A
Other
thing
I
tried
to
eliminate
was
like,
was
it
that
it,
the
GC,
wasn't
just
not
catching
up
right
and
I
couldn't
really
show
that
there
was
any
evidence
of
that
either,
although
that's
sometimes
hard
to
do
because
you
don't
know
whether
just
cuz
you
called
the
GC
doesn't
mean
it
actually
happens
right.
That's.
C
Right,
yeah,
yeah
well
I
mean
the
evidence.
The
evidence
would
be
that
the
number
of
week
callbacks
equals
the
number
of
created
references
right
I
mean
the
GC
will
have
caught
up.
If
that's
the
case
right,
if
you,
if
you
one
reference
everything
on
the
JavaScript
side,
and
there
is
no
reason
why
there
would
be
a
gap
between
the
number
of
references
created
and
the
number
of
times
the
week
callback
gets
called
like.
A
A
That
would
force
it
to
GC
to
happen.
Yeah
so
I
mean
I
did
I
did
some
things
like
I
tried
to
slow
it
down
so
that
there
was
more
GCS
in
terms
of
the
ratio
like
the
force,
GCS
versus
a
ratio
being
what
was
being
created
right
and
that
did
not
fix
it
like
if
that
and
fixed
it.
That
would
have
made
me
think
Oh,
just
not
keeping
up
so
I.
That's
where
I
tried
to
see
if
I
could
show
that,
but
I
couldn't
right.
E
C
A
C
A
C
A
D
D
A
C
E
C
C
A
C
And
actually
now
that
I
talk
now
that
I
think
about
it.
One
one
thing
we
can
focus
on
this
year,
in
addition
to
an
API,
is,
is
a
context.
Awareness
for
four
atoms
try
to
try
to
get
add-on.
Maintainer
Zoar
those
starting
out
making
new
add-ons,
keep
in
mind
context
awareness,
because
workers
are
becoming
ever
more
mainstream
and
and
Anna's
done
an
awesome
job.
Making
sure
that
native
add-ons
can
take
advantage
of
that.
A
C
C
A
E
A
C
That's
right,
yeah,
that's
right!
Yes,
an
API
is
all
they
know
and
all
they
should
know
essentially
I
mean
I.
You
know
not
to
be
presumptuous
or
anything,
but
but
this
has
to
happen
sooner
or
later,
and
we
have
to
sort
of
we
have
to.
You
know,
show
what
it's
like
to
be
a
person
for
whom
an
API
is
taken
for
granted.
You
know
so
that
we
may
be.
You
know
examples
and.
E
A
Way
to
start
shifting
to
us,
like
you
know,
building
add-ons,
and
then
it's
like
okay.
Well,
you
know
this
is
the
API
and
well
when
not
to
use
it
like
okay,
you
don't
use
it
when
this
specific
situations,
otherwise
you
should
be
using
it
and
that's
why
I
like
TFS
n
is
important.
Like
here's
a
wave,
you
know
you
don't
need
to
use
these
other
api's
yeah.
B
A
A
A
E
E
A
D
D
D
D
A
So
basically
so
I
understand
this
would
let
you
write
your
add-on
in
go
yeah
right,
okay,
but
yeah.
That's
definitely
interesting
to
basically
say:
okay,
you
know
the
the
API
is
flexible
enough
and
it
lets
you
say:
okay,
I,
don't
want
to
use
C
I
want
to
use,
go
instead,
right,
so
yeah.
You
would
find
that
interesting.
B
D
A
C
Basically,
I'm
planning
on
on
just
sort
of
walking
everybody
through
the
what
happens
and
how
we
load
native
add-ons
and
all
the
different
trade-offs
that
that
that
had
happened
throughout
its
history
and
and
the
native
loader
how
it
has
evolved.
That
kind
of
thing,
and
and
trying
to
put
emphasis
on
on
context
awareness
again,
because
we're
gonna
need
that
and
soon
right.
You.
C
Where
we're
you
know
publishing
a
native
add-on
as
context-aware
required
that
that
you,
you
make
a
very
explicit
code
change,
which
is
to
move
away
from
the
from
the
library
constructor
based
load
or
to
the
to
the
well-known
symbol
based
loader
right
now
that
now
that
Ana
has
has
has
made
it
possible
to
use
the
the
library
constructor
based
loader
by
by
remembering
the
nm
module
and
keeping
keeping
it
in
a
hash
table.
Now,
modules
will
implicitly
be
assumed
to
be
context
aware
so.
A
E
C
A
C
Yeah,
you
know
so
yeah
I
mean
an
N.
Api
is
a
is
a
big
reason.
Why
why
this
is
becoming
important,
because
the
focus
is
no
longer
is
no
longer
on.
Oh,
no
v8
broke
again:
I
have
to
rebuild
the
module
yeah
thanks
to
an
API.
That's
no
longer
the
focus.
Now
the
focus
is
okay.
Now
we
have
multiple
JavaScript
threads,
but
only
one,
but
only
one
chunk
of
memory
that
is
dedicated
to
a
module,
because
that's
what
a
shared
object
is.
C
D
C
Don't
I
was
I
was
thinking
about
that
very,
very
often
and
and
maybe
I'll
throw
it
out
there,
but
basically
what
I?
What
I
was
thinking
about
is
is
if
we
could
write
a
class,
something
like
like
native
add
on
the
name
of
the
class,
is
native,
add
on
right
and
then
you
know
the
init
function
returns.
C
A
new
instance
of
native,
add
on
right
and
and
a
native
add-on
could
be
a
superclass
of
an
object
wrap
because
because
you
can,
you
know
you
can,
if
you
return
an
instance
of
native,
add
on
then
then
you
know,
that's
that's
that's
an
instance,
a
JavaScript
instance
of
a
JavaScript
class
right
right
and
and
and
you,
and
that
would
basically
mean
that
that
you
intentionally
ignore
the
the
exports
object
that
gets
passed
into
the
init
function
and
you
return
a
new
object
which
is
fine.
That's
okay!
C
It's
it's
possible
to
do
that
and
it's
perfectly
acceptable
and
if
we
did
it
this
way,
if
we
abstracted
things
this
way,
would
this
like
native
add-on
class,
then
we
would
get.
We
would
get
potentially
I
shouldn't
I
shouldn't
say
that
absolutely
we
would
potentially
guess
context
awareness
unless
you
know
the
native,
the
native,
the
definition
of
the
subclass
of
native,
add
Don
has
static
fields
right
which
people
are
free
to
declare
right,
but
as.
C
A
C
Yeah
yeah,
the
pattern
is
already
there.
I
think
I
think
it's
already
on
know
that
on
examples,
I
am
I
posted
one
for
context
towards
I,
believe
it's
been
merged,
I
I'd
have
to
check,
but
but
yeah.
So
so
so
the
pattern
is
basically,
you
declared
this
class
yourself
and
then,
and
then
you
know
you
you
instantiate
it
during
in
it,
and
then
you
pass
you
pass
a
pointer
or
you
pass
around
the
pointer
to
to
the
instance
that
you
created
to
all
of
your
bindings.
C
So
basically,
when
you
create
your
binding,
you
you
give
it
not
just
a
function
name
and
a
native
function
pointer.
You
also
give
it
the
data
you
make
use
of
the
data
pointer
that
we've
always
had
and
and
for
which
we
had
to
add
nappy,
add
finalizer,
because
we
didn't
had
a
finalizar
to
not
be
create
function.
So
we
had
to
add
one
after
the
fact
and
and
one
of
the
important
reasons
for
that
is
so
you
can
free
that
pointer.
So,
basically,
basically
the
pattern
is
that
you
declare
your
bindings.
C
You,
you
declare
them
with
data.
The
data
is
always
the
instance
to
that
function,
point
or
the
instance
to
that
or
a
pointer
to
that
instance,
and
the
first
thing
you
do
in
all
your
bindings
is
you
reinterpret
cast
the
void
star
to
that
instance
before
you
do
anything
else?
So
if
we
can
abstract
this
away
good,
but
we
have
to
do
it
so
that
we
don't
add
yet
another
layer
of
indirection
where
you
know
you
write
bindings
for
for
context-aware
add-ons
and
not
bindings
for
know
that
on
API
you
know
so
right.
A
C
Then
that's
that's
yet
another
level
of
thunking
and
at
that
point
it
just
doesn't
make
any
sense.
So
we
have
to
do
it
without
changing
the
signature
for
for
a
callback
and
that's
that's
actually
kind
of
it
seems
like
a
shortcoming
of
C++.
Like
you
know,
you
can't
write
the
function
wrapper
that
that
that
basically
does
one
thing
and
then
calls
another
function.
C
C
A
C
A
A
The
other
thing
I'll
mention
is:
there
was
an
email
from
Kevin
working
on
the
TFS
n
PR
says
there
was
an
invitation
detailed.
He
wants
to
verify
this
correct
approach,
meeting
to
template
both
the
context
and
finalize
or
data
type.
He
left
the
comment
and
he'd
like
some
feedback
and
how
to
continue
before
proceeding
so
I
think
you'd
mentioned
that
you
had
some
questions
around
needing
to
template
a
number
of
things.
Yeah.
A
C
Just
one
minor
thing:
I
I
added
another
example:
I
submitted
a
PR
for
another
example,
one
where
a
native
add-on
accepts
an
array
buffer
from
the
JavaScript
side
like
an
array
buffer
is
created
on
the
JavaScript
side,
because
there
was
this
person
who,
who
correctly
realized
that
the
translating
a
JavaScript
array
into
a
native
array
is
an
extremely
expensive
operation.
Right.
C
A
C
Step
but
it
could
also
be
a
separate
example,
because
sometimes
you'd
want
the
array
buffer
to
to
go
across
rather
than
the
the
higher
level
view
of
it
right.
Oh
that's,
sort
of
a
degree
of
freedom.
We
can
write
one
example
both
examples,
only
the
top
level
example,
but
so
far
I
just
wrote
the
array
buffer
because
that's
what
they
wanted.
They
wanted
an
ending
array
and
an
array
buffer.
Is
that
yeah?
Oh
no
yeah.
We
start
with
the
one.
We
have
that's
good
yeah.
So
that's
the
only
small
thing.
A
C
Yeah
here
we
go
yeah
I'm,
just
looking
at
the
docs
for
array,
and
indeed
we
should.
We
should
probably
mention
that
as
a
by
the
way,
you
know
yeah,
because
this
is
this-
is
this-
is
strictly
API
documentation
when
we
look
at
the
array
so
yeah,
so
so
so
as
kind
of
a
footnote
at
the
end,
cuz
everybody
happens
to
be
the
last
thing
on
that
page.
C
D
C
Very
small
thing,
just
sort
of
a
general
observation
as
more
and
more
people
are
using
no
data
on
API
I'm,
starting
to
see
that
we're
getting
issues
which
are
not
necessarily
know
the
add-on
api-related
right.
So
so
you
know
general
things
general
javascript
in
general.
Bindings
writing
issues
are
sort
of
landing
on
our
doorstep.
Now
that
more
people
are
going
through
know
than
on
API
to
do
this
work
right.