Commit Graph

28 Commits

Author SHA1 Message Date
8854c0edbe add build.bat 2024-02-22 23:23:07 -06:00
00a9fda814 again 2024-02-22 22:57:27 -06:00
a8c1a10cab fix MSVC warnings 2024-02-22 22:40:53 -06:00
2a71914ed8 ok 2024-02-22 20:58:47 -06:00
dea448e46b better 2024-02-22 18:23:33 -06:00
3811d82212 skin this cat 2024-02-22 16:02:31 -06:00
2baee14c5d misc Lua Version difference fixes 2024-02-22 11:15:17 -06:00
198265ee36 get compiling with c++ 2024-02-22 10:15:01 -06:00
604e3df41f just starting 2024-02-22 03:54:51 -06:00
6a99504835 Minor fixes and API change
- fix stupid spaces in Makefile
- small type annotation fix
- Modify Expression constructor API to use varargs
- Update kiwi.lua to support future C API module
2024-02-21 22:14:24 -06:00
9b00e62d43 update github workflow 2024-02-19 21:31:59 -06:00
3631704544 update LICENSE 2024-02-19 09:20:46 -06:00
17f67b8879 use our own lua gh action 2024-02-18 00:20:41 -06:00
d83cc3468c Drop LuaJIT 2.0.5 support
Primary CI target is luajit-openresty. Even 2.1.0-beta3 is ancient.
2024-02-17 22:36:28 -06:00
b3cf6136a4 Convert enum values to number for LuaJIT 2.0.5 compat 2024-02-17 22:07:01 -06:00
2ffc5a333b All kinds of things
- Add modified BSD license
- Initial test runner github action
- Add is_{type} functions
- export kiwi.Error metatable such that it appears like a class.
- Allow Expression.new to take nil for terms
- Initial set of specs
2024-02-17 21:58:13 -06:00
d85796a038 More flexible error handling, convenience methods
Allow getting solver errors returned rather than raising error.
The API allows setting a mask of which error kinds raise vs return.

Also add some convenience methods:
- `add_to` and `remove_from` constraint methods to solver.
- add and remove multiple constraints and edit/suggest variables at once
2024-02-17 01:08:45 -06:00
37833f7b2b Remove now unnecessary const_casts. 2024-02-17 01:08:45 -06:00
59465d3142 Add const to Solver dump methods and Variable equals. 2024-02-17 01:08:29 -06:00
8b57e0c441 Use global scratch space for temporary objects, better errors 2024-02-15 16:23:57 -06:00
bc948d1a61 Restyle and limit scopes for quicker navigation 2024-02-14 16:00:49 -06:00
3311b582a1 Refactors to produce slightly less garbage 2024-02-14 13:53:14 -06:00
84a01179cd Manage GC data better
Make sure that all cdata references for variables is tracked. This is
done by attaching finalizers to Expression and Term objects. Some
effort is made to avoid creating tracked temporary objects (esp Terms)
now.
2024-02-14 01:42:56 -06:00
e43272487f Guard against most egregious mistakes in calling the library
LuaJIT FFI is not inherently memory safe and there is no way
to completely guard against the caller doing something that
will trample over memory, but we can get pretty close. Biggest
issue is that an empty table will stand-in for a ref struct with
a null ref. So check for that in all the calls. In the calls that
raise errors we now have a specific error for it. In the other
functions the "nil" object is handled quietly but without a nullptr
dereference and hopefully no UB.
2024-02-13 16:58:59 -06:00
59bdeedc18 Initial actual commit, awaiting CI 2024-02-12 18:05:41 -06:00
70a9213c91 Merge commit '81396a5322a7a48764fcf254d5d933ba1e57bdc5' as 'kiwi' 2024-02-11 15:32:50 -06:00
81396a5322 Squashed 'kiwi/' content from commit 268028e
git-subtree-dir: kiwi
git-subtree-split: 268028ee4a694dcd89e4b1e683bf2f9ac48c08d9
2024-02-11 15:32:50 -06:00
d6a95c7794 Initial commit 2024-02-11 15:31:01 -06:00