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

doc: improve addons.markdown copy #4320

Closed
wants to merge 2 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Dec 17, 2015

General improvements to the documentation in addons.markdown.

/cc @nodejs/documentation

@jasnell jasnell added doc Issues and PRs related to the documentations. lts-watch-v4.x labels Dec 17, 2015
@jasnell
Copy link
Member Author

jasnell commented Dec 17, 2015

ping ... @nodejs/collaborators @rvagg


- V8 JavaScript, a C++ library. Used for interfacing with JavaScript:
creating objects, calling functions, etc. Documented mostly in the
At the moment, The method for implementing Addons is rather complicated,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/The/the

@jasnell
Copy link
Member Author

jasnell commented Dec 18, 2015

@rvagg ... thank you for the review! Pushed an update with fixes... still need to figure out #4320 (comment) tho... will look at that next

@jasnell
Copy link
Member Author

jasnell commented Dec 18, 2015

@rvagg ... ok, added some language on the deps headers. PTAL

- V8: the C++ library Node.js currently uses to provide the
JavaScript implementation. V8 provides the mechanisms for creating objects,
calling functions, etc. V8's API is documented mostly in the
`V8.h` header file (`deps/V8/include/V8.h` in the Node.js source
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filenames should have use lowercase v8.

@jasnell
Copy link
Member Author

jasnell commented Dec 18, 2015

@ofrobots ... fixed!

creating objects, calling functions, etc. Documented mostly in the
`v8.h` header file (`deps/v8/include/v8.h` in the Node.js source
Node.js Addons are dynamically-linked shared objects, written in C or C++, that
can be loaded into Node.js using the `require()` statement, and used just as if
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require is not a statement

General improvements to the documentation in addons.markdown.

- Node.js includes a number of other statically linked libraries including
OpenSSL. These other libraries are located in the `deps/` directory in the
Node.js source tree. Only the v8 and OpenSSL symbols are purposefully
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In few other places it is referred as V8.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh lol... I keep missing these. Hopefully this is the last one

@jasnell
Copy link
Member Author

jasnell commented Dec 22, 2015

@thefourtheye ... fixed!

@thefourtheye
Copy link
Contributor

@jasnell I didn't try all the code examples. But except the comment about dynamically linked thingy, everything else LGTM.

@jasnell
Copy link
Member Author

jasnell commented Dec 22, 2015

+1 ... I dropped the "statically" in that one paragraph.

@thefourtheye
Copy link
Contributor

Actually I would like to understand that paragraph better. So, if you don't mind, let's wait for one more LGTM.

If the Addons were to dynamically link to V8, then the V8 has to be compiled and installed as a separate library in the target machine, right? Only then the Addons can load them at runtime. Is that the case here?

@bnoordhuis
Copy link
Member

The node binary exports the public symbols from libv8.a. Add-ons themselves don't load libv8, their references to V8 API functions are resolved by the dynamic linker at run-time to the ones from the node binary.

@jasnell
Copy link
Member Author

jasnell commented Dec 23, 2015

Given the couple of days that have passed and no further comments, I'm going to go ahead and land this.

jasnell added a commit that referenced this pull request Dec 23, 2015
General improvements to the documentation in addons.markdown.

PR-URL: #4320
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@jasnell
Copy link
Member Author

jasnell commented Dec 23, 2015

Landed in d5863bc

@jasnell jasnell closed this Dec 23, 2015
@MylesBorins
Copy link
Contributor

this one is merging with conflicts, and I believe there is a second commit @rvagg to fix some regressions this created. @jasnell can you take the lead on this one?

@jasnell
Copy link
Member Author

jasnell commented Dec 30, 2015

I'll handle porting these.

Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request Jan 6, 2016
General improvements to the documentation in addons.markdown.

PR-URL: nodejs#4320
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@jasnell
Copy link
Member Author

jasnell commented Jan 29, 2016

@thealphanerd ... will be porting this to LTS early next week

jasnell added a commit to jasnell/node that referenced this pull request Feb 19, 2016
General improvements to the documentation in addons.markdown.

PR-URL: nodejs#4320
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 22, 2016
General improvements to the documentation in addons.markdown.

PR-URL: #4320
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 22, 2016
General improvements to the documentation in addons.markdown.

PR-URL: #4320
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
General improvements to the documentation in addons.markdown.

PR-URL: #4320
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
General improvements to the documentation in addons.markdown.

PR-URL: nodejs#4320
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants