Skip to content

doc: copyedit addons.md#62071

Open
aduh95 wants to merge 2 commits intonodejs:mainfrom
aduh95:addons-copyedit
Open

doc: copyedit addons.md#62071
aduh95 wants to merge 2 commits intonodejs:mainfrom
aduh95:addons-copyedit

Conversation

@aduh95
Copy link
Contributor

@aduh95 aduh95 commented Mar 2, 2026

  • Make the intro less C++-centric (node has way of knowing what language the shared object was compiled from, C++ is just what we happen to document and support)
  • Give a GYP-less build example (for most use-case, starting a GYP project would be a mistake. Having a simpler Makefile setup makes more sense for a Hello World IMO)
  • Remove the duplicate Node-API documentation (We have a dedicated page for this, folks who have read the document are clearly not interested in Node-API)
  • Add an ESM example (because why not)

* Make the intro less C++-centric
* Give a GYP-less build example
* Remove the duplicate Node-API documentation
* Add an ESM example
@aduh95 aduh95 added the dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. label Mar 2, 2026
@nodejs-github-bot nodejs-github-bot added addons Issues and PRs related to native addons. doc Issues and PRs related to the documentations. labels Mar 2, 2026

```bash
NODEJS_DEV_ROOT ?= $(shell dirname "$$(command -v node)")/..
CXXFLAGS = -std=c++23 -I$(NODEJS_DEV_ROOT)/include/node -fPIC -shared -Wl,-undefined,dynamic_lookup
Copy link
Member

Choose a reason for hiding this comment

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

I think the flag -Wl,-undefined,dynamic_lookup only works on macOS, and does not match the above words "On most platforms"...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested it from within a docker container with gcc, it didn't seem to cause problems. Happy to update to something else if you have suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addons Issues and PRs related to native addons. doc Issues and PRs related to the documentations. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants