Commit Graph

11 Commits

Author SHA1 Message Date
198265ee36 get compiling with c++ 2024-02-22 10:15:01 -06:00
604e3df41f just starting 2024-02-22 03:54:51 -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
8b57e0c441 Use global scratch space for temporary objects, better errors 2024-02-15 16:23:57 -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
d6a95c7794 Initial commit 2024-02-11 15:31:01 -06:00