Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charto/nbind-example-universal
Example of compiling C++ to asm.js and Node.js addons
https://github.com/charto/nbind-example-universal
Last synced: 5 days ago
JSON representation
Example of compiling C++ to asm.js and Node.js addons
- Host: GitHub
- URL: https://github.com/charto/nbind-example-universal
- Owner: charto
- Created: 2016-06-06T11:50:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-12T21:41:00.000Z (almost 8 years ago)
- Last Synced: 2024-08-10T14:21:51.708Z (3 months ago)
- Language: TypeScript
- Size: 74.2 KB
- Stars: 14
- Watchers: 3
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
nbind-example-universal
=======================[![build status](https://travis-ci.org/charto/nbind-example-universal.svg?branch=master)](http://travis-ci.org/charto/nbind-example-universal)
This is an example of using [nbind](https://github.com/charto/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:
- GCC 4.8 or above
- Clang 3.6 or above
- Visual Studio 2015 ([The Community version](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx) is fine)Otherwise the asm.js fallback is used.
Usage
-----First install:
```bash
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/](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.