Support for alternative build tools (node-cmake)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 271
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 2
Description
In an effort to ditch the python dependency of node-gyp, we've been experimenting with node-cmake, which is a thin wrapper around cmake.
It's use is quite straightforward if you're already using CMake. We just added this:
and we can build our .node binary with:
./node_modules/.bin/ncmake --build
After this is run, all the usual node-pre-gyp package, node-pre-gyp publish commands work as expected.
With a little bit of hackery, I added support for ncmake to node-pre-gyp build by providing an alternative to lib/util/compile.js that calls the appropriate ncmake commands instead of their node-gyp equivalents.
Would it make sense to support alternative build tools like this in node-pre-gyp on a larger scale? The publishing logic is well established and independent of the build tool.
An alternative might be to fork node-pre-gyp into node-pre-cmake.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading lib/util/compile.js and the linked CMakeLists.txt section, then compare the existing node-gyp build path with the ncmake commands described in the issue. Determine whether the requested scope is a general alternative-build-tool interface or support specifically for ncmake; done means the chosen approach builds successfully while preserving the existing packaging and publishing commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, javascript, nodejs
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100