GithubHelp home page GithubHelp logo

hhy5277 / nodecpp-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from freezer333/nodecpp-demo

0.0 1.0 0.0 2.94 MB

Node.js C++ integration sample code

Python 1.30% C++ 95.19% JavaScript 3.49% C 0.01% Makefile 0.02%

nodecpp-demo's Introduction

nodecpp-demo

This repository contains full code listings that help guide you through developing Node.js addons.

The content is fully explained on my blog - blog.scottfrees.com and is the subject of my ebook - C++ and Node.js Integration.

Basics

Some simple "hello world" type programs, discussed in the first chapter of the ebook.

Conversions

Code "cheat sheet" for passing different data types between C++ and JavaScript. See here for associated blog post. This is also covered in Chapter 2 of the ebook.

Conversions_NAN

The same "cheat sheet" as Conversions, but using the NAN API rather than native V8. Covered in Chapter 6 of the ebook.

Rainfall

Contains a full example of using objects, arrays, and asynchronous callbacks to exchange data between JavaScript and C++ library for doing some (trivial) number crunching. This supports a 4-part blog series, which starts here. Covered in Chapters 3 and 4 of the ebook.

Primes

A set of example addon functions demonstrating NAN's AsyncWorker and AsyncProgressWorker. Covered in Chapter 6 of the ebook.

ObjectWrap

An ObjectWrap example developing a C++ polynomial class. Covered in Chapter 5 of the ebook.

ObjectWrap_NAN

The same Polynomial class, but using NAN instead of direct Node.js API. Covered in Chapter 6 of the ebook.

Streaming

A complete SDK and set of examples for using NAN and asynchronous callbacks to stream data between C++ and JavaScript. This is the subject of Chapter 7 of the ebook.

Buffers

An example of using buffers to move data between JavaScript and a simple image processing C++ addon (converting PNG to BMP using LodePNG). This is covered in Appendix B of the ebook.

Packaging

A set of examples for building and distributing reusable addons. Covered in Chapter 8 of the ebook.

nodecpp-demo's People

Contributors

davisjam avatar freezer333 avatar zbjornson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.