node.native - C++11 port for node

251 views
Skip to first unread message

Daniel Kang

unread,
Feb 6, 2012, 6:22:21 AM2/6/12
to nodejs
Hi.

I've recently started working on this project: https://github.com/d5/node.native
Primary goal of the project is to implement the C++ 11 port for the
node.

It's as easy as node.js. Look at the following code sample using
lambda expression:

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

int main()
{
http server;
if(server.listen("0.0.0.0", 8080, [](request& req, response& res){
res.set_status(200);
res.set_header("Content-Type", "text/plain");
res.end("C++ FTW\n");
})) std::cout << "Server running at http://0.0.0.0:8080/" <<
std::endl;

return native::run();
}

It's pretty preliminary stage, but, I'm working on adapting any types
of callable object (function, functor, stateless, and stated lambda)
into callbacks. For the current release, it's mainly based on libuv
(https://github.com/joyent/libuv).

If you're interested in, please tell me about your ideas, or leave
messages at github.

Thanks,

- Daniel

Anand George

unread,
Feb 8, 2012, 8:07:40 AM2/8/12
to nod...@googlegroups.com
Hi!

Have just checked out the repo and get the following error on make


Please advise. Am running gcc version 4.4.3 on Ubuntu 10.04 x86_64

Thanks


--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Daniel Kang

unread,
Feb 8, 2012, 10:35:26 AM2/8/12
to nod...@googlegroups.com
Hi,

It seems that gcc 4.4.3 does not support some of C++0x features.

I've test my code gcc 4.6.1.

Thanks,
- Daniel
Reply all
Reply to author
Forward
0 new messages