On Mon, Jan 28, 2013 at 9:33 AM, Zoid <[email protected]> wrote:
> Hi all,
>
> I have 2 related questions:
>
> 1. Is there a way to put both 32-bit and 64-bit .node files under
> node_modules so correct version is chosen based on which node is running. I
> need both 32- and 64-bit node on the same system and would like to have
> single local node_modules tree in my project instead of 2 mostly duplicate
> trees.

Something like this should work:

  var foo = require('build/Release/foo.' + process.arch + '.node');

Compile your module twice (or thrice, if you want to support ARM) to
out/Release/foo.ia32.node and out/Release/foo.x64.node.

It's possible that node-gyp has support for this built in.  Nathan?

> 2. Is there a way to help module maintainers to include precompiled binaries
> in their npm packages? Are binaries still supported? I'd like to start with
> ws and xxhash - they both don't have binaries included at least for x64.
>
> Zoid

You can ship .node files with a npm module and some modules do.  See
the bson module for an example.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to