A C++ wrapper for the wren scripting language (wren.io)
Find a file
King_DuckZ 16c4b8cbe5 Allow foreign_method_fn() in the configuration object.
Wren expects this function to return a pointer to a function
that takes a WrenVM*. This is bad news because that type is
wrapped inside wren::VM and client code doesn't know about it.
It would be better for client code to return a pointer to a
function that takes a VM* instead. In order to do the VM* to
WrenVM* translation I make a "handmade" closure, that is I
generate a function at runtime that contains the VM* hardcoded
into it. The same function also contains the hardcoded
address of the callback function client code wanted to use.
By doing this I can pass a different function pointer to Wren
for each foreign method, and that function knows how to forward
the call to the real client callback.
Currently only implemented for amd64 gnu/linux.
2020-04-26 17:20:12 +02:00
src Allow foreign_method_fn() in the configuration object. 2020-04-26 17:20:12 +02:00
subprojects/wren Sample code that prints a message from wren 2020-04-25 01:49:46 +02:00
.gitignore Start working on a c++ interface. 2020-04-25 20:45:59 +02:00
.gitmodules Sample code that prints a message from wren 2020-04-25 01:49:46 +02:00
meson.build Allow foreign_method_fn() in the configuration object. 2020-04-26 17:20:12 +02:00