]> khamidou — GitHub mirrors - electron.git/commitdiff
Update native modules doc
authorEran Tiktin <eran.t@mce-sys.com>
Mon, 5 Oct 2015 14:48:48 +0000 (17:48 +0300)
committerEran Tiktin <eran.t@mce-sys.com>
Mon, 5 Oct 2015 14:48:48 +0000 (17:48 +0300)
docs/tutorial/using-native-node-modules.md

index 0e6477fc4c04dce8398f6d379b1159e5081e47ea..491415b900ac5db230dd9225e127c0d43437ab69 100644 (file)
@@ -6,16 +6,17 @@ the location of Electron's headers when building native modules.
 
 ## Native Node Module Compatibility
 
-Since Node v0.11.x there were vital changes in the V8 API. So generally all
-native modules written for Node v0.10.x won't work for newer Node or io.js
-versions. And because Electron internally uses __io.js v3.1.0__, it has the
-same problem.
-
-To solve this, you should use modules that support Node v0.11.x or later,
-[many modules](https://www.npmjs.org/browse/depended/nan) do support both now.
-For old modules that only support Node v0.10.x, you should use the
-[nan](https://github.com/rvagg/nan) module to port it to v0.11.x or later
-versions of Node or io.js.
+Native modules might break when Node starts using a new version of V8.
+To make sure the module you're interested in will work with Electron, you should
+check if it supports the internal Node version used by Electron.
+You can check what version of Node is used in Electron by looking it up in
+the [releases](https://github.com/atom/electron/releases) page or by using
+`process.version` (see [Quick Start](https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md)
+for example).
+
+Consider using [NAN](https://github.com/nodejs/nan/) for your own modules, since
+it makes it easier to support multiple versions of Node. It's also helpful for
+porting old modules to newer versions of Node so they can work with Electron.
 
 ## How to Install Native Modules