facebook / hermes

A JavaScript engine optimized for running React Native.

Home Page:https://hermesengine.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++ class bindings

verenkoska opened this issue · comments

Problem

As mentioned in the title, is there any plan to introduce class bindings?
It’s nice we now have support for classes in Hermes, but I haven’t found any method for class bindings yet.

This could be useful for my use case,
Thank you

Unfortunately we don't have support for classes. There is an AST transformation, but it is unsupported, undocumented, not fully spec-compliant and we don't recommend using it. However we are working on classes and we will publish fully working classes implementation in the Static Hermes branch within a month.

What does "class bindings" mean?

Nice to know, thanks @tmikov !
Let's say I have two classes in C++:

class Base {
    ....
}

class Derived : public Base {
    ....
}

I want to be able to bind all methods and constructor, so I can use and instantiate objects of the two classes inside JS.
Will you have specific methods to do so in the Static Hermes branch?