title: Node-webkit multi platform native module with nw-gyp
body: <p>I'm currently writing a node-webkit application which uses a native module (<a href="https://github.com/EyalAr/lwip" rel="nofollow"><code>lwip</code></a>). I found out that I need to compile native modules with <code>nw-gyp</code>.
  After using <code>nw-gyp</code> a new file <code>lwip_image.node</code> will be created under <code>node_modules/lwip/build/Release</code>. </p>
  
  <ol>
  <li><p>How is the native module required? Like this: <code>var lwip_image = require('./node_modules/lwip/build/Release/lwip_image.node')</code> ??</p></li>
  <li><p>If the native module was created on Win8 x64, will it also work on Win7 x64 or even Win8/7 x32? Same question for Mac vs Ubuntu x32 vs Ubuntu x64?</p></li>
  <li><p>To facilitate the build process I would build the native modules on the target platforms once. After that I would like to copy them all to my project dir so I can automate the build process to build it for all platforms at once. How would I go about that? Use <code>os.platform()</code> and require depending on platform? ...</p></li>
  </ol>
  
  <p><strong>UPDATE:</strong> Those posts were what I was looking for: <a href="https://github.com/joyent/node/issues/4398#issuecomment-11233144" rel="nofollow">https://github.com/joyent/node/issues/4398#issuecomment-11233144</a>
  <a href="https://github.com/npm/npm/issues/1891" rel="nofollow">https://github.com/npm/npm/issues/1891</a></p>