Hmm....I think I need to stick with Emscripten. The basic usage of what I am trying to do is make an XMLHttpRequest by calling Javascript code from C++ and then having the Javascript callback to the C++ code. I know there is a wget function in Emscripten, but you can't set any headers with it. Since I'm making a REST API client that is quite crippling. I've been doing some reading and I think lambdas might help out here, but there aren't any full examples. I saw Chad's discussion
here, but I'm still not clear on it.
My initial thought was to instantiate an "HTTPClient" class in C++ and create several lambda functions (with capture by value) inside the calling member method that could be passed as callbacks. So far I cannot get that to compile.
I do like the ease of use with nbind though. I see you have a "
nbind::cbOutput" type over there. Sounds like what I am trying to do. How much does nbind increase the size of the output JS though?