Kiwiberry is a pure Nim port of Kiwi which is a fast implementation of the Cassowary constraint solving algorithm using floating points for more general solving. E.g. it's a fast linear constraint solver that supports cycles.
It's what MacOSX and iOS for autolayout as well as other UIs. Original Cassowary paper.
Benchmark against the original C++ version which is pretty highly optimized is reasonable: Kiwiberry 0.280824 ms/iter vs Kiwi 0.160790 ms/iter. The port was done with Codex GPT-5.5 with the Kiwi tests used as verification.
## Example
import kiwiberry
var solver = initSolver()
let width = vars"width"
solver[width] = Strong
solver.constraint(width >= 100)
solver.suggest(width, 240)
solver.update()
doAssert width.value == 240.KiwiScalar
You can do more complex constraints like x1 + 3 * x2 <= 4 * x3 + 2.
https://github.com/khchen/wNim uses https://github.com/yglukhov/kiwi
will you release a GUI lib based on https://github.com/elcritch/kiwiberry?