C++11 port for the Node: native performance and modern simplicity.
C++ Python Makefile C
Latest commit d64e510 Jun 10, 2016 @dennycd dennycd committed on GitHub Merge pull request #40 from jtomschroeder/add_inlines
Made functions inline to avoid 'multiple definition' errors
Failed to load latest commit information.
doc testing doxygen; added preliminary doc for loop class Feb 8, 2012
http-parser @ fa74550 Submodule fix Jan 27, 2013
libuv @ 017e2d5 Submodule fix Jan 27, 2013
native Made functions inline to avoid 'multiple definition' errors Feb 2, 2015
.gitignore added gyp file Aug 24, 2013
.gitmodules Submodules, OSX compatibility and updated for new libuv Jan 20, 2013
LICENSE MIT license - word wrapping ;D Feb 13, 2012
Makefile Removes extraneous tab chars Nov 21, 2013
file_test.cpp adding more fs functions; updated file_test.cpp Feb 8, 2012
node.native.gyp added gyp file Aug 24, 2013
webclient.cpp removed file-related test code from webclient.cpp Feb 8, 2012
webserver.cpp Adds code to access request body Nov 20, 2013



node.native is a C++11 (aka C++0x) port for node.js.

Please note that node.native project is under heavy development.

I'm working on the first release at v0.1.0 branch.

Sample code

Simplest web-server example using node.native.

#include <iostream>
#include <native/native.h>
using namespace native::http;

int main() {
    http server;
    if(!server.listen("", 8080, [](request& req, response& res) {
        res.set_header("Content-Type", "text/plain");
        res.end("C++ FTW\n");
    })) return 1; // Failed to run server.

    std::cout << "Server running at" << std::endl;
    return native::run();

Getting started

node.native consists of header files(*.h) only, but requires libuv and http-parser lib to use.

To compile included sample application(webserver.cpp) first run the following command in the project directory:

git submodule update --init



alternatively you can set custom paths to http-parser and libuv if you dont want to use the submodules.

Tested on Ubuntu 11.10 and GCC 4.6.1. and OSX 10.8.2

Other Resources