{"componentChunkName":"component---src-templates-page-tsx","path":"/getting-started/prerequisites/","result":{"data":{"site":{"siteMetadata":{"title":"The Node-API Resource","description":"Tutorials and more for Node.js Node-API.","siteUrl":"https://github.com/nodejs/node-addon-examples","keywords":"node nodejs n-api napi tutorials native-addon","author":{"name":"The Node-API Team","url":"https://github.com/nodejs/node-addon-examples","email":""}}},"sectionList":{"edges":[{"node":{"title":"About Node-API","items":[{"id":"about.what","slug":"/about/what","title":"What is Node-API?"},{"id":"about.uses","slug":"/about/uses","title":"Uses for Node-API"}]}},{"node":{"title":"Getting Started","items":[{"id":"getting-started.prerequisites","slug":"/getting-started/prerequisites","title":"Prerequisites"},{"id":"getting-started.tools","slug":"/getting-started/tools","title":"The tools you'll need"},{"id":"getting-started.first","slug":"/getting-started/first","title":"A first project"},{"id":"getting-started.objectwrap","slug":"/getting-started/objectwrap","title":"Object wrap"},{"id":"getting-started.migration","slug":"/getting-started/migration","title":"Migration tutorial"}]}},{"node":{"title":"Build Tools","items":[{"id":"build-tools.node-gyp","slug":"/build-tools/node-gyp","title":"node-gyp"},{"id":"build-tools.cmake-js","slug":"/build-tools/cmake-js","title":"CMake.js"},{"id":"build-tools.node-pre-gyp","slug":"/build-tools/node-pre-gyp","title":"node-pre-gyp"},{"id":"build-tools.prebuild","slug":"/build-tools/prebuild","title":"prebuild"}]}},{"node":{"title":"Special Topics","items":[{"id":"special-topics.object-function-refs","slug":"/special-topics/object-function-refs","title":"Object & function refs"},{"id":"special-topics.asyncworker","slug":"/special-topics/asyncworker","title":"AsyncWorker"},{"id":"special-topics.thread-safe-functions","slug":"/special-topics/thread-safe-functions","title":"Thread-safe functions"},{"id":"special-topics.context-awareness","slug":"/special-topics/context-awareness","title":"Context awareness"}]}}]},"markdownRemark":{"htmlAst":{"type":"root","children":[{"type":"element","tagName":"h2","properties":{"id":"cc-and-javascript","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#cc-and-javascript","ariaLabel":"cc and javascript permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"C/C++ and JavaScript"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The purpose of Node-API is to enable you to use your existing or newly written C/C++ code from JavaScript. This assumes at least a passing familiarity with both JavaScript and C/C++. The level of familiarity necessary is dependent upon the complexity of your project and your involvement with the JavaScript and the C/C++. "}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For your own projects, it will be necessary to have an understanding of the C/C++ code you plan to integrate as well as what objectives you hope to achieve with your project on the JavaScript side of things. "}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"command-line-tools","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#command-line-tools","ariaLabel":"command line tools permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Command line tools"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Many of the tools used to develop Node-API modules are run from the command line. So at least a passing familiarity and confidence with your command line tool is essential. IDEs, as described "},{"type":"element","tagName":"a","properties":{"href":"tools#other-tools"},"children":[{"type":"text","value":"here"}]},{"type":"text","value":" can help. But they also rely in the command line."}]}],"data":{"quirksMode":false}},"tableOfContents":"<ul>\n<li><a href=\"/node-addon-examples/getting-started/prerequisites/#cc-and-javascript\">C/C++ and JavaScript</a></li>\n<li><a href=\"/node-addon-examples/getting-started/prerequisites/#command-line-tools\">Command line tools</a></li>\n</ul>","excerpt":"C/C++ and JavaScript The purpose of Node-API is to enable you to use your existing or newly written C/C++ code from JavaScript. This assumes…","frontmatter":{"id":"getting-started.prerequisites","title":"Prerequisites","prev":null,"next":"getting-started.tools"}}},"pageContext":{"slug":"/getting-started/prerequisites/"}},"staticQueryHashes":["1919669498","757746438"]}