What do you mean by "shim a C++ API"? And in what way are embind and the webidl-binder not sufficient?
- Alon On Thu, Sep 11, 2014 at 7:29 PM, Arve Knudsen <[email protected]> wrote: > I can't see that those docs mention how to shim a C++ API in JavaScript? > There is a section on C API though, and how to integrate your shims, so > that's helpful at least. Is it simply not possible to shim a C++ API? If > so, I'll have to write a C wrapper instead I guess. > > Arve > > > On Fri, Sep 12, 2014 at 11:17 AM, Alon Zakai <[email protected]> wrote: > >> General docs on that are at >> http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html?highlight=webidl >> >> In particular if you are going to use C++ classes from JS, you probably >> want embind or webidl-binder. >> >> - Alon >> >> >> On Thu, Sep 11, 2014 at 7:02 PM, Arve Knudsen <[email protected]> >> wrote: >> >>> Hi guys >>> >>> As pertaining my previous more general question about writing Emscripten >>> shims, I have a more specific follow-up question. How can I write an >>> Emscripten shim library to mimic the RtAudio C++ class constructor ( >>> http://www.music.mcgill.ca/~gary/rtaudio/classRtAudio.html#afd0bfa26deae9804e18faff59d0273d9)? >>> And how do I integrate said shim into my build, so that invoking the >>> constructor works? The shim will eventually need to do more than just mimic >>> the constructor of course, but that would be a superb start. >>> >>> For context, what I'm trying to do is to port the ChucK music >>> programming language to JS, my GitHub project can be found here (branch >>> emscripten): https://github.com/aknuds1/chuck/tree/emscripten. The >>> README includes instructions on how to build with Emscripten. >>> >>> Let me know if you need to know more. >>> >>> Best, >>> Arve >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "emscripten-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
