Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ class bindings #1392

Open
verenkoska opened this issue May 4, 2024 · 2 comments
Open

C++ class bindings #1392

verenkoska opened this issue May 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@verenkoska
Copy link

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

@verenkoska verenkoska added the enhancement New feature or request label May 4, 2024
@tmikov
Copy link
Contributor

tmikov commented May 5, 2024

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?

@verenkoska
Copy link
Author

verenkoska commented May 5, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants