Skip to content

Commit

Permalink
[docs] native module with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Feb 25, 2016
1 parent cf600be commit 9f2a798
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/For Users/Advanced/Use Native Node Modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@

[TOC]

`npm` tool provided by Node.js builds the native modules, i.e. [C/C++ Addons](https://nodejs.org/api/addons.html), at the time of installation. However the V8 version and Node ABI in NW.js is different from official Node.js. To use native Node.js modules with NW.js, you have to rebuild the modules with one of following tools.
`npm` tool provided by Node.js builds the native modules, i.e. [C/C++ Addons](https://nodejs.org/api/addons.html), at the time of installation.

Starting from 0.13.0, native modules built by node-gyp or npm in upstream can be supported.

In Linux and OSX you can just load the native module directly. In windows you'll need to replace the file
%APPDATA%\npm\node_modules\node-gyp\src\win_delay_load_hook.c with the one at https://github.com/nwjs/nw.js/blob/nw13/tools/win_delay_load_hook.c

Before 0.13.0, the V8 version and Node ABI in NW.js is different from official Node.js. To use native Node.js modules with NW.js, you have to rebuild the modules with one of following tools.

## nw-gyp

Expand Down

0 comments on commit 9f2a798

Please sign in to comment.