|
_embind_register_class: function( rawType, rawPointerType, rawConstPointerType, baseClassRawType, getActualTypeSignature, getActualType, upcastSignature, upcast, downcastSignature, downcast, name, destructorSignature, rawDestructor ) { name = readLatin1String(name);
...
whenDependentTypesAreResolved( [rawType, rawPointerType, rawConstPointerType], baseClassRawType ? [baseClassRawType] : [], function(base) { ... if (typeof Custom_registerClass != "undefined") { Custom_registerClass(rawType, name, baseClassName); } ... } |
Next, its a simple matter of making sure Custom.js gets included when you are generating your custom bindings. We had to update emcc to allow for this - we added a new parameter called --csbind (similar to --bind) for this:
emcc --csbind bindingsFile.cpp -o mycustomcode.<suffix>
mycustomcode.<suffix> will contain whatever bindings you need (in your language of choice - you just have to update Custom.js to support that).
This took some time to set up (a couple of weeks), but is turning out to be a fairly clean solution since we can use the same set of bindings for multiple purposes. If you need more clarification, do let me know, I'd be happy to explain further.
--
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 emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.