The latest nbind 0.3.5 now has some nice new features. It autogenerates TypeScript .d.ts files from C++ function and method argument and return types. This means that a TypeScript IDE or compiler can statically check that the C++ code is used correctly. There's also a reflection API to inspect contents of C++ bindings from JavaScript at run-time.
64-bit integers are losslessly converted between C++ and JavaScript. The JavaScript side can decide if it wants to receive them as doubles (rounding to 53 bits) or objects with 32-bit high and low halves. Support for shared pointers and simple garbage collection in asm.js. If enabled from JavaScript, new C++ objects are destroyed on the next tick unless their .persist() method is called. This is convenient for dealing with temporary values. Accessing a.b.c.d might call several getters returning C++ objects by value, but they'll be automatically dismissed without leaking memory. Pointers, references, shared pointers, vectors etc. etc. are now handled with no extra code or fuss. Unbound types are always reported nicely, for example: Unbound type const std::vector<const 9740? ** const> & in TestClass.myMethod Multiple inheritance between C++ classes is now supported. As always, the features also work identically when targeting native Node.js or Electron addons compiled using GCC, Clang or Visual Studio 2015. -- 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.
