Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
dukglue/dukglue.h
✓ #include <dukglue/dukglue.h>
Register a C++ lambda as a JavaScript function and call it.
#include <dukglue/dukglue.h>
#include <duktape.h>
int main() {
duk_context* ctx = duk_create_heap_default();
dukglue_register_function(ctx, [] { return 42; }, "getAnswer");
duk_eval_string(ctx, "getAnswer()");
std::cout << duk_get_int(ctx, -1) << std::endl;
duk_destroy_heap(ctx);
return 0;
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
2022-11-08latest on vcpkg
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.