genepi icon indicating copy to clipboard operation
genepi copied to clipboard

Ability to bind a custom constructors/methods

Open deadlocklogic opened this issue 2 years ago • 0 comments

Suppose the following:

struct Test {
};

I want to be able to bind a custom external function as a method like so:

void func(Test& self) {
}

and then on the javascript side I would like to be able to call it as a member method like:

new Test().func()

Many binding libs for python/lua for instance can do this easily, even they can accept lambda functions. Is there a way to do so here? By the way I like this lib as it is almost the only one which compiles with newer nodejs versions. Thanks.

deadlocklogic avatar Sep 17 '22 17:09 deadlocklogic