6a47be250f
Replace crc32 implementation
...
This is a properly constexpr version for modern c++. Also
added a fast runtime version of it.
2022-05-23 04:19:54 +02:00
1fa6d62f17
Add support for registering foreign methods that return foreign objects
...
Still a bit work in progress but functioning
2022-05-18 18:48:18 +02:00
a17e49dd27
Version bump to 0.1.3
2022-05-15 23:09:49 +02:00
400adf50c6
Add build option wren_with_name_guessing
2022-05-15 20:14:34 +02:00
d3ad818b8e
Fix installation
2022-05-14 19:49:29 +02:00
258237cbf3
Implement ClassManager
...
Very similar to CallbackManager in its functioning.
2022-05-14 17:06:25 +02:00
fa0183a3bf
Implement CallbackManager
...
With it users don't have to provide a foreign_method_fn()
function anymore, it's become optional.
2022-04-29 18:16:57 +02:00
5d6575f328
Add make_foreign_object() overload
...
It's only available when users define WRENPP_WITH_NAME_GUESSING
and it automatically retrieves the class name of T using
new code in guess_class_name.hpp. Only tested on gcc so far.
Microsoft compiler doesn't seem to understand consteval keyword.
2022-04-29 12:34:01 +02:00
7a821fcd2c
Add support for aarch64
2022-04-24 03:41:14 +02:00
f985abca61
Version bump to 0.1.2
2021-02-12 14:43:25 +01:00
719a57d3e8
Add lib name to config header
2021-02-10 23:14:13 +01:00
4c65807d93
This option was removed from the subproject
2021-02-10 12:48:21 +01:00
3c318d6771
Add a very simple test program
...
Not quite a unit test, it looks more like an example
but still something.
2021-02-02 14:04:27 +01:00
4360ad03cf
Version bump to 0.1.1
2020-05-04 00:41:39 +02:00
65189a5575
Move files around
...
Sample main.cpp is now into examples/greet
2020-05-02 22:55:10 +02:00
a3c1199da9
Add a small dice rolling example game
2020-05-02 22:41:58 +02:00
482410356d
More trying...
2020-05-01 21:14:01 +02:00
274a2fea11
Update sample code in main(), fix the rest as required
2020-05-01 01:39:11 +02:00
8ba01de416
Fix release build containing debug info
2020-05-01 00:49:52 +02:00
32f4a01586
Force compiling wren as a static lib
2020-05-01 00:33:51 +02:00
640cc0e493
Reordering things a bit
...
I currently have meson 0.52.1 and the default_library=static
option has no effect for me, but I'm leaving it there in case
this changes in the future.
2020-05-01 00:14:55 +02:00
6fc3422548
This file also belongs to the wren lib, move it
2020-04-30 22:57:52 +02:00
0f0d149ad2
Move public headers to a separate directory, make a library
2020-04-30 22:50:46 +02:00
2755371792
Refactoring.
...
VM now aims to only wrap Wren's c functions as closely as
possible. All the fun stuff should be put into vm_fun.hpp.
2020-04-30 19:54:51 +02:00
79f59f5d36
Add Handle class.
2020-04-28 14:25:35 +02:00
0d0ea0a0cc
It seems right now cpu_family() behaves more consistently than cpu()
2020-04-27 12:05:03 +02:00
0545f26990
Trying to be a bit less platform-specific.
...
This has only been tested on my amd64 gnu/linux, so take it with
the due suspicions.
2020-04-26 22:06:53 +02:00
2c2d783730
Remove hardcoded binary data, get it from the corresponding assembly instead.
2020-04-26 20:37:12 +02:00
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
3142e4c4ce
Start working on a c++ interface.
2020-04-25 20:45:59 +02:00
257513e72a
Sample code that prints a message from wren
2020-04-25 01:49:46 +02:00