Skip to content

Linked bindings initialization #44

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

Closed
kaero opened this issue Dec 7, 2015 · 6 comments
Closed

Linked bindings initialization #44

kaero opened this issue Dec 7, 2015 · 6 comments

Comments

@kaero
Copy link

kaero commented Dec 7, 2015

Hi!

We've used linked bindings to compile single statically linked node binary for deployment, so i've a question about difference in the initialization process for built-in bindings, linked bindings and native extensions as dynamic libraries.

As far as i can see, linked binding initialization works more like built-in native modules init: module can be called using process._linkedBinding() and initialization function receive v8::String as second argument instead of v8::Object instance of Module.

My question is: is it good idea to hack linked binding initialization to make to behave more like require + DLOpen (create instance of Module and pass it to initialization function) or it's reserved for some internal needs? Maybe where is another, less "private" way to have native extensions as compiled-in modules?

@kaero
Copy link
Author

kaero commented Jan 19, 2016

@indutny Hi, Fedor! Can you help me to find anyone interested in this discussion? Is it right place for it?

@indutny
Copy link
Member

indutny commented Jan 19, 2016

@kaero I think it is a plain bug, and it should be receiving a module object instead of String.

@indutny
Copy link
Member

indutny commented Jan 19, 2016

Please feel free to file an issue for this.

@indutny
Copy link
Member

indutny commented Jan 19, 2016

And don't forget to cc me there ;) I'm going to take a look at it.

@kaero
Copy link
Author

kaero commented Jan 19, 2016

btw, it's only part my question. Second one is about usage of process._linkedBinding() which looks like private because of leading underscore in the name ;) Is it ok to use it?

@indutny
Copy link
Member

indutny commented Jan 19, 2016

I think the second question could be answered in a following way: please file an additional issue and cc me ;)

It probably just needs a documentation listing its signature and action, but it should be quite safe to use. Also, if it will get a doc - we will consider removing underscore.

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

No branches or pull requests

3 participants