Skip to content

charto/nbind-example-universal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nbind-example-universal

build status

This is an example of using nbind to distribute a native Node.js addon with an asm.js fallback, also usable from web browsers.

The optional native addon is installed if you have one of the following C++ compilers:

Otherwise the asm.js fallback is used.

Usage

First install:

git clone https://github.com/charto/nbind-example-universal.git
cd nbind-example-universal
npm install

Then run the example in Node.js with npm test or in the browser by running npm start and navigating to http://localhost:8080/.

Note that you shouldn't add the compiled asm.js code in version control. In this example it's present in the dist directory simply to allow installing directly from Github without having Emscripten available.

License

This example is public domain.

About

Example of compiling C++ to asm.js and Node.js addons

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published